pub struct InterruptHandler<T: GpiotePin> { /* private fields */ }Expand description
GPIO interrupt handler for one pin.
Bind one handler per pin used with an async Input, OutputOpenDrain or Flex, on that
pin’s GPIOTE interrupt (GpiotePin::Interrupt). All pins served by a GPIOTE instance share
its interrupt, so list one handler per pin:
ⓘ
bind_interrupts!(struct Irqs {
GPIOTE => gpio::InterruptHandler<peripherals::P0_11>, gpio::InterruptHandler<peripherals::P0_12>;
});The handler only services its own pin, so the same interrupt can also be bound to
gpiote::InterruptHandler for GPIOTE channels, and to your
own Handler for pins used in blocking mode. If your handler uses the PORT event, it must
clear EVENTS_PORT first and then clear only its own pins’ bits in LATCH. While any LATCH
bit of a port stays set, no new PORT event is generated for that port.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for InterruptHandler<T>where
PhantomData<T>: Freeze,
impl<T> RefUnwindSafe for InterruptHandler<T>where
PhantomData<T>: RefUnwindSafe,
impl<T> Send for InterruptHandler<T>where
PhantomData<T>: Send,
impl<T> Sync for InterruptHandler<T>where
PhantomData<T>: Sync,
impl<T> Unpin for InterruptHandler<T>where
PhantomData<T>: Unpin,
impl<T> UnsafeUnpin for InterruptHandler<T>where
PhantomData<T>: UnsafeUnpin,
impl<T> UnwindSafe for InterruptHandler<T>where
PhantomData<T>: 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