Struct lis3dh_async::Lis3dhSPI
source · pub struct Lis3dhSPI<SPI> { /* private fields */ }
Expand description
Marker to indicate SPI is used to communicate with the Lis3dh
Trait Implementations§
source§impl<SPI, ESPI> Lis3dhCore for Lis3dhSPI<SPI>where
SPI: SpiDevice<Error = ESPI>,
impl<SPI, ESPI> Lis3dhCore for Lis3dhSPI<SPI>where
SPI: SpiDevice<Error = ESPI>,
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 = ESPI
Auto Trait Implementations§
impl<SPI> RefUnwindSafe for Lis3dhSPI<SPI>where
SPI: RefUnwindSafe,
impl<SPI> Send for Lis3dhSPI<SPI>where
SPI: Send,
impl<SPI> Sync for Lis3dhSPI<SPI>where
SPI: Sync,
impl<SPI> Unpin for Lis3dhSPI<SPI>where
SPI: Unpin,
impl<SPI> UnwindSafe for Lis3dhSPI<SPI>where
SPI: 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