[][src]Struct lis2dh12::Int

pub struct Int<'a, REG, I2C> { /* fields omitted */ }

Interrupt setting and status

Implementations

impl<'a, REG, I2C, E> Int<'a, REG, I2C> where
    REG: IntRegs,
    I2C: WriteRead<Error = E> + Write<Error = E>,
    E: Debug
[src]

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

Disable interrupt, INTx_CFG clean all bits

pub fn set_mode(&mut self, mode: Aoi6d) -> Result<(), Error<E>>[src]

AOI-6D Interrupt mode, INTx_CFG: AOI, 6D

pub fn enable_high(
    &mut self,
    (x, y, z): (bool, bool, bool)
) -> Result<(), Error<E>>
[src]

X,Y,Z high event enable, INTx_CFG: XHIE, YHIE, ZHIE

pub fn enable_low(
    &mut self,
    (x, y, z): (bool, bool, bool)
) -> Result<(), Error<E>>
[src]

X,Y,Z low event enable, INTx_CFG: XLIE, YLIE, ZLIE

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

Source, INTx_SRC decoded as ((XH, XL), (YH, YL), (ZH, ZL))

pub fn set_ths(&mut self, ths: u8) -> Result<(), Error<E>>[src]

Threshold, INTx_THS: THS

pub fn set_thsf(&mut self, ths: f32) -> Result<(), Error<E>>[src]

Threshold as f32, INTx_THS: THS

pub fn set_duration(&mut self, d: u8) -> Result<(), Error<E>>[src]

Duration, INTx_DURATION: D

Auto Trait Implementations

impl<'a, REG, I2C> RefUnwindSafe for Int<'a, REG, I2C> where
    I2C: RefUnwindSafe,
    REG: RefUnwindSafe

impl<'a, REG, I2C> Send for Int<'a, REG, I2C> where
    I2C: Send,
    REG: Send

impl<'a, REG, I2C> Sync for Int<'a, REG, I2C> where
    I2C: Sync,
    REG: Sync

impl<'a, REG, I2C> Unpin for Int<'a, REG, I2C> where
    REG: Unpin

impl<'a, REG, I2C> !UnwindSafe for Int<'a, REG, I2C>

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.