-
Notifications
You must be signed in to change notification settings - Fork 618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make SpiDevice generic over Word size and implement u16 transfer #2893
Conversation
I think it should be possible to avoid adding the generic param to the struct itself, using it on impls only. This way you don't have to choose a word size when creating the SpiDevice, it'll just transparently implement all transfer sizes the underlying bus implements. |
Also, SpiDevice should not implement the embedded-hal v0.2 SPI traits. Those are equivalent to the 1.0 SpiBus, ie they're for a bare bus without any CS pin. |
Yeah, I was quite confused about that but went along with it. The traits that were used (Transfer, Write) do not exist anymore, so I removed them, is this correct ? |
oh, they were already there. my bad, I misread the diff and thought you had added them. hmmm :| |
Thanks @Ragarnoy, I was going to implement this today! |
It's not particularly complicated, this allows to be more in line with other implementations like ExclusiveDevice which also has an u16 word size