doceme / py-spidev

MIT License
461 stars 203 forks source link

xfer does not de-assert CS between bytes #35

Open EricPobot opened 8 years ago

EricPobot commented 8 years ago

xfer seems to behave exactly as xfer2, and does not de-assert CS between the bytes of the data to be transmitted. Checked with logic analyzer.

Context: Raspi2, Raspbian, Python 2.7.9

semiversus commented 7 years ago

This is my understanding what xfer should do. Set CS to active, transfer given bytes and deassert at the end.

semiversus commented 7 years ago

The difference between xfer and xfer2 is the handling of CS at the end of the transmission: deassert it or leave it active.

Gadgetoid commented 4 years ago

I know I'm late to the party, but I've been digging through the code lately. I'm pretty sure there is no difference between xfer and xfer2 unless the library is compiled with -DSPIDEV_SINGLE. Otherwise these two methods are functionally identical.