Attribute Macro avr_device::interrupt
source · #[interrupt]
Expand description
Attribute to declare an interrupt service routine
#[avr_device::interrupt(atmega32u4)]
fn INT6() {
// ...
}
§Constraints
- The name of the function must be the name of an interrupt. Each chip’s
module has a
Interrupt
enum defining the available names. - The attribute needs the chip-name to correctly map the interrupt to its vector. This is an unfortunate requirement of the current crate architecture and might change in the future.
- The function must have a signature of
[unsafe] fn() [-> !]
. - This macro requires the avr-device
rt
crate feature.