[]Attribute Macro avr_device::interrupt

#[interrupt]

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() [-> !].