-
Notifications
You must be signed in to change notification settings - Fork 56
Open
Description
I'm using the spidriver to interface with a PN532 NFC module. The former uses most-significant bit (MSB) first shifting while the latter uses least-significant bit (LSB) first shifting on the SPI bus.
It seems from the datasheet for the spidrivers microcontroller, the hardware SPI shift order can be configured, and would be a nice feature to have.
Unfortunately, I don't know Forth to implement a PR. Instead, I've modified the spicli tool [1] to add "lsb" and "msb" commands to reverse the bits in bytes before transmitting and after receiving, and it works well enough that writing shell scripts against spicli remains clean and readable.
[1]: https://github.com/boxofrox/spidriver/tree/feature/bit-shift-order
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels