eblot / pyftdi

FTDI device driver written in pure Python
Other
509 stars 212 forks source link

Add support for active high CS #382

Open andreasWallner opened 4 months ago

andreasWallner commented 4 months ago

We have a few custom devices that use active-high CS. I only looked after an initial implementation and then saw #86 and #258.

After checking those I saw that also the newer PR (#258) is too old to cover some of the current API, so I stuck with my implementation but took the API feedback from #258 on board and implemented the setting as an iterable over CS slot numbers.

I verified the changes with some devices here, as well as via logic analyzer and the added testcase.

I also fixed some forgotten fs in f-strings and a documentation typo.

Exchange test: image

Read test: image

Write test: image

Mixed test: image