macro_rules! bind_interrupts {
($vis:vis struct $name:ident { $($irq:ident => $($handler:ty),*;)* }) => { ... };
}Expand description
Bind interrupt sources to a single handler each.
This defines the right interrupt handlers, creates a unit struct (like
struct Irqs;) and implements the right
Bindings for it. You can pass
this struct to drivers to prove at compile-time that the right interrupts
have been bound.
Refer to the module-level documentation for details on when to use
bind_interrupts vs
bind_multiple_interrupts.
ยงExample
use atsamd_hal::{dmac, sercom, bind_interrupts};
bind_interrupts!(struct Irqs {
SERCOM0 => sercom::i2c::InterruptHandler;
DMAC => dmac::InterruptHandler;
});