Macro handler

Source
macro_rules! handler {
    ($name:ident = $e:expr) => { ... };
}
Expand description

Defines a closure-based interrupt handler that can use stack-local data.

This is a convenience macro that creates a &mut Handler variable that can be passed to Scope::register.

ยงExamples

let mut i = 0;
handler!(my_handler = || i += 1);