embedded-hal-bus
Bus/Device connection mechanisms for [embedded-hal
], a Hardware Abstraction Layer (HAL) for embedded systems.
It is possible to connect several peripherals to a bus like SPI or I2C.
To support this, embedded-hal
provides the SpiBus
and SpiDevice
traits in the case of SPI, for example.
embedded-hal
trait implementations for microcontrollers should implement the ...Bus
traits.
However, device drivers should use the ...Device
traits, not the ...Bus
traits if at all possible
in order to allow for sharing of the bus they are connected to.
This crate provides mechanisms to connect a ...Bus
and a ...Device
.
For further details on these traits, please consult the embedded-hal
documentation.
This project is developed and maintained by the HAL team.
This crate is guaranteed to compile on stable Rust 1.54 and up. It might compile with older versions but that may change in any new patch release.
See here for details on how the MSRV may be upgraded.
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Contribution to this crate is organized under the terms of the Rust Code of Conduct, the maintainer of this crate, the HAL team, promises to intervene to uphold that code of conduct.