Struct lis3dh::Lis3dhSPI

source ·
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>
where SPI: Write<u8, Error = ESPI> + Transfer<u8, Error = ESPI>, NSS: OutputPin<Error = ENSS>,

source§

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>>

Write a byte to the given register.

source§

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>
where NSS: Freeze, SPI: Freeze,

§

impl<SPI, NSS> RefUnwindSafe for Lis3dhSPI<SPI, NSS>
where NSS: RefUnwindSafe, SPI: RefUnwindSafe,

§

impl<SPI, NSS> Send for Lis3dhSPI<SPI, NSS>
where NSS: Send, SPI: Send,

§

impl<SPI, NSS> Sync for Lis3dhSPI<SPI, NSS>
where NSS: Sync, SPI: Sync,

§

impl<SPI, NSS> Unpin for Lis3dhSPI<SPI, NSS>
where NSS: Unpin, SPI: Unpin,

§

impl<SPI, NSS> UnwindSafe for Lis3dhSPI<SPI, NSS>
where NSS: UnwindSafe, SPI: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.