[][src]Trait fk_lis3dsh::Accelerometer

pub trait Accelerometer {
    type Error: Debug;
    fn accel_norm(&mut self) -> Result<F32x3, Error<Self::Error>>;
fn sample_rate(&mut self) -> Result<f32, Error<Self::Error>>; }

Accelerometer trait which provides g-normalized readings.

Associated Types

type Error: Debug

Error type

Loading content...

Required methods

fn accel_norm(&mut self) -> Result<F32x3, Error<Self::Error>>

Get normalized ±g reading from the accelerometer.

Ex. {0.0, 5.2, 0.0} - 5.2 g of acceleration in the y-axis

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

Get sample rate of accelerometer data.

Ex. 125.0 - sample rate of 125hz

Loading content...

Implementors

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>

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

Get the sample rate of the accelerometer data.

Loading content...