pub struct Int<'a, REG, I2C> { /* private fields */ }Expand description
Interrupt setting and status
Implementations§
Source§impl<'a, REG, I2C: I2c> Int<'a, REG, I2C>where
REG: IntRegs,
impl<'a, REG, I2C: I2c> Int<'a, REG, I2C>where
REG: IntRegs,
Sourcepub fn disable(&mut self) -> Result<(), Error<I2C::Error>>
pub fn disable(&mut self) -> Result<(), Error<I2C::Error>>
Disable interrupt,
INTx_CFG clean all bits
Sourcepub fn set_mode(&mut self, mode: Aoi6d) -> Result<(), Error<I2C::Error>>
pub fn set_mode(&mut self, mode: Aoi6d) -> Result<(), Error<I2C::Error>>
AOI-6D Interrupt mode,
INTx_CFG: AOI, 6D
Sourcepub fn enable_high(
&mut self,
(x, y, z): (bool, bool, bool),
) -> Result<(), Error<I2C::Error>>
pub fn enable_high( &mut self, (x, y, z): (bool, bool, bool), ) -> Result<(), Error<I2C::Error>>
X,Y,Z high event enable,
INTx_CFG: XHIE, YHIE, ZHIE
Sourcepub fn enable_low(
&mut self,
(x, y, z): (bool, bool, bool),
) -> Result<(), Error<I2C::Error>>
pub fn enable_low( &mut self, (x, y, z): (bool, bool, bool), ) -> Result<(), Error<I2C::Error>>
X,Y,Z low event enable,
INTx_CFG: XLIE, YLIE, ZLIE
Sourcepub fn get_src(
&mut self,
) -> Result<Option<((bool, bool), (bool, bool), (bool, bool))>, Error<I2C::Error>>
pub fn get_src( &mut self, ) -> Result<Option<((bool, bool), (bool, bool), (bool, bool))>, Error<I2C::Error>>
Source,
INTx_SRC decoded as ((XH, XL), (YH, YL), (ZH, ZL))
Auto Trait Implementations§
impl<'a, REG, I2C> Freeze for Int<'a, REG, I2C>
impl<'a, REG, I2C> RefUnwindSafe for Int<'a, REG, I2C>where
REG: RefUnwindSafe,
I2C: RefUnwindSafe,
impl<'a, REG, I2C> Send for Int<'a, REG, I2C>
impl<'a, REG, I2C> Sync for Int<'a, REG, I2C>
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§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more