pub struct InterruptHandler<T: Pin> { /* 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 interrupt (Pin::Interrupt). All pins of a bank share one interrupt, so list one
handler per pin:
ⓘ
bind_interrupts!(struct Irqs {
IO_IRQ_BANK0 => gpio::InterruptHandler<peripherals::PIN_5>, gpio::InterruptHandler<peripherals::PIN_13>;
});The handler only services its own pin, so the same interrupt can also be bound to your own
Handler for pins used in blocking mode.
The async constructors enable the interrupt in the NVIC of the core they run on. The HAL doesn’t enable it otherwise, so if you only use your own handler, enable it yourself.
Trait Implementations§
Auto Trait Implementations§
impl<T> Forget for InterruptHandler<T>
impl<T> Freeze for InterruptHandler<T>where
PhantomData<T>: Freeze,
impl<T> Move for InterruptHandler<T>
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