pub struct ExtInt<P, Id, F = NoneT>{ /* private fields */ }
Expand description
A numbered external interrupt, which can be used to sense state changes on its pin.
Implementations§
Source§impl<P, Id> ExtInt<P, Id, NoneT>
impl<P, Id> ExtInt<P, Id, NoneT>
Sourcepub fn into_future<I>(self, _irq: I) -> ExtInt<P, Id, EicFuture>where
I: Binding<P::InterruptSource, InterruptHandler>,
InterruptHandler: Handler<P::InterruptSource>,
pub fn into_future<I>(self, _irq: I) -> ExtInt<P, Id, EicFuture>where
I: Binding<P::InterruptSource, InterruptHandler>,
InterruptHandler: Handler<P::InterruptSource>,
Turn an EIC pin into a pin usable as a Future
.
The correct interrupt source is needed.
Source§impl<P, Id, F> ExtInt<P, Id, F>
impl<P, Id, F> ExtInt<P, Id, F>
pub fn enable_event(&mut self)
pub fn enable_interrupt(&mut self)
pub fn disable_interrupt(&mut self)
pub fn is_interrupt(&mut self) -> bool
pub fn state(&mut self) -> bool
pub fn clear_interrupt(&mut self)
pub fn sense(&mut self, sense: Sense)
pub fn filter(&mut self, filter: bool)
Trait Implementations§
Source§impl<P, Id> Wait for ExtInt<P, Id, EicFuture>
impl<P, Id> Wait for ExtInt<P, Id, EicFuture>
Source§async fn wait_for_high(&mut self) -> Result<(), Self::Error>
async fn wait_for_high(&mut self) -> Result<(), Self::Error>
Wait until the pin is high. If it is already high, return immediately. Read more
Source§async fn wait_for_low(&mut self) -> Result<(), Self::Error>
async fn wait_for_low(&mut self) -> Result<(), Self::Error>
Wait until the pin is low. If it is already low, return immediately. Read more
Source§async fn wait_for_rising_edge(&mut self) -> Result<(), Self::Error>
async fn wait_for_rising_edge(&mut self) -> Result<(), Self::Error>
Wait for the pin to undergo a transition from low to high. Read more
Auto Trait Implementations§
impl<P, Id, F> Freeze for ExtInt<P, Id, F>
impl<P, Id, F> RefUnwindSafe for ExtInt<P, Id, F>where
Id: RefUnwindSafe,
F: RefUnwindSafe,
<P as AnyPin>::Mode: RefUnwindSafe,
<P as AnyPin>::Id: RefUnwindSafe,
impl<P, Id, F> Send for ExtInt<P, Id, F>
impl<P, Id, F = NoneT> !Sync for ExtInt<P, Id, F>
impl<P, Id, F> Unpin for ExtInt<P, Id, F>
impl<P, Id, F> UnwindSafe for ExtInt<P, Id, F>where
Id: UnwindSafe,
F: UnwindSafe,
<P as AnyPin>::Mode: UnwindSafe,
<P as AnyPin>::Id: UnwindSafe,
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