Trait Lis3dhCore

Source
pub trait Lis3dhCore {
    type BusError;

    // Required methods
    async fn write_register(
        &mut self,
        register: Register,
        value: u8,
    ) -> Result<(), Error<Self::BusError>>;
    async fn read_register(
        &mut self,
        register: Register,
    ) -> Result<u8, Error<Self::BusError>>;
    async fn read_accel_bytes(
        &mut self,
    ) -> Result<[u8; 6], Error<Self::BusError>>;
}

Required Associated Types§

Required Methods§

Source

async fn write_register( &mut self, register: Register, value: u8, ) -> Result<(), Error<Self::BusError>>

Source

async fn read_register( &mut self, register: Register, ) -> Result<u8, Error<Self::BusError>>

Source

async fn read_accel_bytes(&mut self) -> Result<[u8; 6], Error<Self::BusError>>

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.

Implementors§

Source§

impl<CORE> Lis3dhCore for Lis3dh<CORE>
where CORE: Lis3dhCore,

Source§

impl<I2C, E> Lis3dhCore for Lis3dhI2C<I2C>
where I2C: I2c<Error = E>,

Source§

impl<SPI, ESPI> Lis3dhCore for Lis3dhSPI<SPI>
where SPI: SpiDevice<Error = ESPI>,

Source§

type BusError = ESPI