pub trait AsyncAccess {
type BusError;
// Required methods
async fn read_word(&mut self, reg: u8) -> Result<u16, Self::BusError>;
async fn write_word(
&mut self,
reg: u8,
word: u16,
) -> Result<(), Self::BusError>;
async fn read_words(
&mut self,
reg: u8,
words: &mut [u16],
) -> Result<(), Self::BusError>;
}Expand description
Low-level async register access contract used by the async driver.
This trait is public so the driver can remain transport-agnostic, but most users will rely on the built-in I2C and SPI implementations.
Required Associated Types§
Required Methods§
Sourceasync fn read_word(&mut self, reg: u8) -> Result<u16, Self::BusError>
async fn read_word(&mut self, reg: u8) -> Result<u16, Self::BusError>
Read a single 16-bit register payload from the BMI323.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.