embedded-hal
embedded-hal copied to clipboard
e-h-bus: Adding `AtomicDevice` for I2C and SPI bus sharing in multiple interrupt contexts
trafficstars
This PR adds a primitive for sharing an I2C or SPI bus across multiple threads where the synchronization scheme is managed externally (i.e. RTIC sync resources).
The user is returned an Error::Busy if they ever attempt to pre-empt usage of the bus.
CC @Dirbaio as we were talking about this in the Matrix channel yesterday.