pub struct Lis3dhSPI<SPI, NSS> { /* private fields */ }
Expand description
Marker to indicate SPI is used to communicate with the Lis3dh
Trait Implementations§
source§impl<SPI, NSS, ESPI, ENSS> Lis3dhCore for Lis3dhSPI<SPI, NSS>
impl<SPI, NSS, ESPI, ENSS> Lis3dhCore for Lis3dhSPI<SPI, NSS>
source§fn read_accel_bytes(&mut self) -> Result<[u8; 6], Error<ESPI, ENSS>>
fn read_accel_bytes(&mut self) -> Result<[u8; 6], Error<ESPI, ENSS>>
Read from the registers for each of the 3 axes.
source§fn write_register(
&mut self,
register: Register,
value: u8
) -> Result<(), Error<ESPI, ENSS>>
fn write_register( &mut self, register: Register, value: u8 ) -> Result<(), Error<ESPI, ENSS>>
Write a byte to the given register.
source§fn read_register(&mut self, register: Register) -> Result<u8, Error<ESPI, ENSS>>
fn read_register(&mut self, register: Register) -> Result<u8, Error<ESPI, ENSS>>
Read a byte from the given register.
type BusError = ESPI
type PinError = ENSS
Auto Trait Implementations§
impl<SPI, NSS> Freeze for Lis3dhSPI<SPI, NSS>
impl<SPI, NSS> RefUnwindSafe for Lis3dhSPI<SPI, NSS>where
NSS: RefUnwindSafe,
SPI: RefUnwindSafe,
impl<SPI, NSS> Send for Lis3dhSPI<SPI, NSS>
impl<SPI, NSS> Sync for Lis3dhSPI<SPI, NSS>
impl<SPI, NSS> Unpin for Lis3dhSPI<SPI, NSS>
impl<SPI, NSS> UnwindSafe for Lis3dhSPI<SPI, NSS>where
NSS: UnwindSafe,
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