pub trait RawAccelerometer<V>where
    V: Vector,{
    type Error: Debug;

    // Required method
    fn accel_raw(&mut self) -> Result<V, Error<Self::Error>>;
}
Expand description

Read raw acceleration vectors of type V: Vector.

This is intended to provide direct access to raw accelerometer data and should use a vector type which best matches the raw accelerometer data.

Required Associated Types§

source

type Error: Debug

Error type

Required Methods§

source

fn accel_raw(&mut self) -> Result<V, Error<Self::Error>>

Get raw acceleration data from the accelerometer

Implementations on Foreign Types§

source§

impl<I2C, E> RawAccelerometer<I16x3> for Lis3dh<I2C>where I2C: WriteRead<u8, Error = E> + Write<u8, Error = E>, E: Debug,

source§

fn accel_raw( &mut self ) -> Result<I16x3, Error<<Lis3dh<I2C> as RawAccelerometer<I16x3>>::Error>>

Get raw acceleration data from the accelerometer. You should be reading based on data ready interrupt or if reading in a tight loop you should waiting for is_data_ready.

§

type Error = Error<E>

Implementors§