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 |
Dirbaio
left a comment
There was a problem hiding this comment.
-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-halitself. For example into anembedded-hal-sharedcrate (or some other name, feel free to bikeshed).We should note that we (probably) have the same problem in
embedded-hal-asyncwhere there is also anExclusiveDevicefor SPI, so if we create such a crate, we should agree on what to put in there:ExclusiveDeviceExclusiveDeviceRefCell-based sharingWe should also note that the great
shared-buscrate also solves some of these problems so we might also put (some?) of this there.cc: @Rahix