Attribute Macro esp32c2_hal::macros::interrupt
#[interrupt]
Expand description
Marks a function as an interrupt handler
Used to handle on of the interrupts.
When specified between braces (#[interrupt(example)]
) that interrupt will
be used and the function can have an arbitrary name. Otherwise the name of
the function must be the name of the interrupt.
Example usage:
#[interrupt]
fn GPIO() {
// code
}
The interrupt context can also be supplied by adding a argument to the interrupt function for example, on Xtensa based chips:
fn GPIO(context: &mut xtensa_lx_rt::exception::Context) {
// code
}