[][src]Struct lis2hh12_rs::Lis2hh12

pub struct Lis2hh12<I2C> { /* fields omitted */ }

Methods

impl<I2C, E> Lis2hh12<I2C> where
    I2C: WriteRead<Error = E> + Write<Error = E>, 
[src]

pub fn new(i2c: I2C, address: u8) -> Result<Self, Error<E>>[src]

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

pub fn get_datarate(&mut self) -> Result<DataRate, Error<E>>[src]

pub fn read_register(&mut self, register: Register) -> Result<u8, Error<E>>[src]

pub fn read_accel_bytes(&mut self) -> Result<[u8; 6], Error<E>>[src]

pub fn write_register(
    &mut self,
    register: Register,
    value: u8
) -> Result<(), Error<E>>
[src]

pub fn get_acceleration(&mut self) -> Result<I16x3, Error<E>>[src]

Trait Implementations

impl<I2C, E> Accelerometer<I16x3> for Lis2hh12<I2C> where
    I2C: WriteRead<Error = E> + Write<Error = E>,
    E: Debug
[src]

type Error = Error<E>

Error type

fn acceleration(&mut self) -> Result<I16x3, Error<E>>[src]

Get acceleration reading from the accelerometer

Auto Trait Implementations

impl<I2C> RefUnwindSafe for Lis2hh12<I2C> where
    I2C: RefUnwindSafe

impl<I2C> Send for Lis2hh12<I2C> where
    I2C: Send

impl<I2C> Sync for Lis2hh12<I2C> where
    I2C: Sync

impl<I2C> Unpin for Lis2hh12<I2C> where
    I2C: Unpin

impl<I2C> UnwindSafe for Lis2hh12<I2C> where
    I2C: UnwindSafe

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.