ftd2xx
ftd2xx copied to clipboard
Support reading EEPROM from FT-X devices
Is your feature request related to a problem? Please describe. To read EEPROM from FT-X devices, you must use FT_EEPROM_Read
Describe the solution you'd like Add this method.
Describe alternatives you've considered
Additional context
@snmishra I have it working for my X series device. I'm not sure how it should be returned in the python method. Right now I just return a tuple of struct and strings.
I would copy eeReadEx
if that was implemented... Maybe you could implement that and I can make the eepromRead
method to keep the same output format?
I'm curious @krister-ts . Since Python is perfectly happy with FT_EE_Read
, what is the use case for FT_EE_ReadEx
? Calling the function would be a bit clunky.
EDIT: never mind. I see FT_EEPROM_Read
is the only API on some devices. I think adding ReadEx
doesn't make sense. We can use whatever you have for FT_EEPROM_Read
. What do you think?
@snmishra That should be fine. It might not be a bad idea to add in some convenience that will use the right method for the device.
What about an eeprom class with methods read, write, ua_read, ua_write? Will that work? It only needs to know device type and also have the handle. The device info is collected on init (FTD2XX class) so I don't see any issue there.
@snmishra I noticed ProgramData
class doesn't really seem to be used. Was it meant to be used as the return type of eeRead
?
@snmishra Maybe I should just make a typed dict for x series and we can add more chips as needed. No need to do more work than necessary.