ftd2xx icon indicating copy to clipboard operation
ftd2xx copied to clipboard

Nice api

Open krister-ts opened this issue 2 years ago • 9 comments

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.

krister-ts avatar May 17 '22 21:05 krister-ts

Did not complete the win32 api functions yet but we never implemented them before anyway.

krister-ts avatar May 17 '22 21:05 krister-ts

I think a better API was needed. Thanks for working on this. Could you fix the formatting issues? No tests break with the changes?

snmishra avatar May 17 '22 22:05 snmishra

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.

krister-ts avatar May 17 '22 23:05 krister-ts

For a library, it's important not to break existing code. Let's not change the return types.

snmishra avatar May 18 '22 00:05 snmishra

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.

krister-ts avatar May 18 '22 01:05 krister-ts

@snmishra Tested and blackened. Not sure if you were waiting for me...

krister-ts avatar May 26 '22 01:05 krister-ts

@krister-ts Sorry, super swamped with day-job right now. This will have to wait a little bit, if that's OK with you.

snmishra avatar May 26 '22 01:05 snmishra

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 avatar Mar 22 '24 20:03 ezonca-thorlabs

@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.

snmishra avatar Mar 25 '24 21:03 snmishra