Struct lis3dh_async::Lis3dhI2C
source · pub struct Lis3dhI2C<I2C> { /* private fields */ }
Expand description
Marker to indicate I2C is used to communicate with the Lis3dh
Trait Implementations§
source§impl<I2C, E> Lis3dhCore for Lis3dhI2C<I2C>where
I2C: I2c<Error = E>,
impl<I2C, E> Lis3dhCore for Lis3dhI2C<I2C>where
I2C: I2c<Error = E>,
source§async fn write_register(
&mut self,
register: Register,
value: u8
) -> Result<(), Error<Self::BusError>>
async fn write_register( &mut self, register: Register, value: u8 ) -> Result<(), Error<Self::BusError>>
Write a byte to the given register.
source§async fn read_register(
&mut self,
register: Register
) -> Result<u8, Error<Self::BusError>>
async fn read_register( &mut self, register: Register ) -> Result<u8, Error<Self::BusError>>
Read a byte from the given register.
source§async fn read_accel_bytes(&mut self) -> Result<[u8; 6], Error<Self::BusError>>
async fn read_accel_bytes(&mut self) -> Result<[u8; 6], Error<Self::BusError>>
Read from the registers for each of the 3 axes.
type BusError = E
Auto Trait Implementations§
impl<I2C> RefUnwindSafe for Lis3dhI2C<I2C>where
I2C: RefUnwindSafe,
impl<I2C> Send for Lis3dhI2C<I2C>where
I2C: Send,
impl<I2C> Sync for Lis3dhI2C<I2C>where
I2C: Sync,
impl<I2C> Unpin for Lis3dhI2C<I2C>where
I2C: Unpin,
impl<I2C> UnwindSafe for Lis3dhI2C<I2C>where
I2C: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more