macro_rules! interrupt {
    ( $ Name : ident , $ handler : path , state : $ State : ty = $ initial_state : expr ) => { ... };
    ( $ Name : ident , $ handler : path ) => { ... };
}
Expand description

Macro to override a device specific interrupt handler

Syntax

interrupt!(
    // Name of the interrupt
    $Name:ident,

    // Path to the interrupt handler (a function)
    $handler:path,

    // Optional, state preserved across invocations of the handler
    state: $State:ty = $initial_state:expr,
);

Where $Name must match the name of one of the variants of the Interrupt enum.

The handler must have signature fn() is no state was associated to it; otherwise its signature must be fn(&mut $State).