ftd2xx
ftd2xx copied to clipboard
Nice api
Got rid of the platform specific files (did not delete yet) and put everything into _ftd2xx.py. I put all the function prototypes (dummy python functions) in api*.py files. I separated, as they do in the guide, into classic, win32, etc.
@snmishra I put your structs into typedefs.py and made a few corrections. Not too many. I updated the big struct used by the regular FT_EE_* functions.
Did not complete the win32 api functions yet but we never implemented them before anyway.
I think a better API was needed. Thanks for working on this. Could you fix the formatting issues? No tests break with the changes?
Tests are passing now. I changed eeRead return type to the typed dict.
For some reason my code formatting isn't working. Would you mind formatting when you get a chance?
EDIT: Do you think eeRead should still return a structure? I think dict is more useful but if someone was cloning eeprom, this will break on them.
For a library, it's important not to break existing code. Let's not change the return types.
For a library, it's important not to break existing code. Let's not change the return types.
I'll change that back and see if I can fix my black tomorrow.
@snmishra Tested and blackened. Not sure if you were waiting for me...
@krister-ts Sorry, super swamped with day-job right now. This will have to wait a little bit, if that's OK with you.
I know this PR is quite dated at this point, but is there any chance of getting this merged to add support for X-series EEPROM?
@ezonca-thorlabs I still don't have much time. But if you or someone were to make the PR compatible with master branch without breaking existing code, I could merge it.