-
Notifications
You must be signed in to change notification settings - Fork 201
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
Extract SPI exclusive device into shared crate #398
Conversation
r? @ryankurte (rust-highfive has picked a reviewer for you, use r? to override) |
👍 to splitting, this way we can do breaking changes to these without disturbing the main crate.
not sure on |
My concerns with I like the name |
Maybe |
In yesterday's weekly meeting we discussed a bit about this and I think I like the proposal of naming this |
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.
-bus
LGTM. Better than -adapters
or -util
, that'd inevitable become a dumping ground of random stuff. 👍
bors r+
Some concerns have been raised regarding the error handling in
spi::blocking::ExclusiveDevice
.I am not sure what the problem was, though.
I think @GrantM11235 was the one to raise the concerns so maybe he can elaborate and then I can improve this description.
Since that struct is just a helpful wrapper for a very specific situation, I propose we move it out of
embedded-hal
itself. For example into anembedded-hal-shared
crate (or some other name, feel free to bikeshed).We should note that we (probably) have the same problem in
embedded-hal-async
where there is also anExclusiveDevice
for SPI, so if we create such a crate, we should agree on what to put in there:ExclusiveDevice
ExclusiveDevice
RefCell
-based sharingWe should also note that the great
shared-bus
crate also solves some of these problems so we might also put (some?) of this there.cc: @Rahix