-
Notifications
You must be signed in to change notification settings - Fork 41
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
Split Spidev into device and bus structs #100
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thank you! Thank you for looking into the details as well.
Also, great documentation I must say!
Just added a couple of formatting nitpicks.
Could you also add an entry to the changelog?
If it is not too much to ask, would you be able to bump the version to -alpha.4
and add the corresponding section to the changelog? Then I could directly release this. I know of several people waiting on a release using e-h -rc.1
.
Co-authored-by: Diego Barrios Romero <[email protected]>
No problem, thanks for the review comments! I've updated the changelog. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Sorry this fell off my radar.
As discussed in #99, split
Spidev
intoSpidevDevice
andSpidevBus
, each implementing the respective embedded-hal trait.Compared to the original plan, it seems easier to just let the CS pin be driven normally, and say users can configure SPI_NO_CS if required. I couldn't spot any good way for us to change the configuration to just set this flag without overriding whatever existing mode configuration the user had, and since it should always be a dummy pin anyway, it shouldn't usually matter if it gets toggled.
In the end therefore there's no change to the implementations, just splitting which struct each trait is implemented for (and duplicating the various helper impls).