[][src]Struct fk_lis3dsh::LIS3DSH

pub struct LIS3DSH<CB> { /* fields omitted */ }

Implementations

impl<CB, E, PinError> LIS3DSH<CB> where
    CB: CommBus<CommError = Error<E, PinError>>,
    PinError: Debug,
    E: Debug
[src]

pub fn new_with_interface<DELAY>(
    commbus: CB,
    delay: &mut DELAY
) -> Result<LIS3DSH<CB>, Error<E, PinError>> where
    DELAY: DelayMs<u8>, 
[src]

pub fn get_device_id(&mut self) -> Result<u8, Error<E, PinError>>[src]

WHO_AM_I register.

pub fn get_status_reg(&mut self, reg: u8) -> Result<u8, Error<E, PinError>>[src]

pub fn set_datarate(
    &mut self,
    datarate: DataRate
) -> Result<(), Error<E, PinError>>
[src]

pub fn get_range(&mut self) -> Result<Range, Error<E, PinError>>[src]

pub fn has_data(&mut self) -> Result<bool, Error<E, PinError>>[src]

Trait Implementations

impl<CB, E, PinError> Accelerometer for LIS3DSH<CB> where
    CB: CommBus<CommError = Error<E, PinError>>,
    PinError: Debug,
    E: Debug
[src]

type Error = Error<E, PinError>

Error type

fn sample_rate(&mut self) -> Result<f32, AccelerometerError<Self::Error>>[src]

Get the sample rate of the accelerometer data.

impl<CB, E, PinError> RawAccelerometer<I16x3> for LIS3DSH<CB> where
    CB: CommBus<CommError = Error<E, PinError>>,
    PinError: Debug,
    E: Debug
[src]

type Error = Error<E, PinError>

Error type

Auto Trait Implementations

impl<CB> Send for LIS3DSH<CB> where
    CB: Send

impl<CB> Sync for LIS3DSH<CB> where
    CB: Sync

impl<CB> Unpin for LIS3DSH<CB> where
    CB: Unpin

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.