* Examplem macros: ```rust /// Syntax helper for setting global variables of the form `Mutex>>`. /// eg in interrupt handlers. Ideal for non-copy-type variables that can't be initialized /// immediatiately. /// /// Example: `make_globals!( /// (USB_SERIAL, SerialPort), /// (DELAY, Delay), /// )` #[macro_export] macro_rules! make_globals { ($(($NAME:ident, $type:ty)),+) => { $( static $NAME: Mutex>> = Mutex::new(RefCell::new(None)); )+ }; } /// Syntax helper for getting global variables of the form `Mutex>>` from an interrupt-free /// context - eg in interrupt handlers. /// /// Example: `access_global!(DELAY, delay, cs)` #[macro_export] macro_rules! access_global { ($NAME_GLOBAL:ident, $name_local:ident, $cs:expr) => { let mut part1 = $NAME_GLOBAL.borrow($cs).borrow_mut(); let $name_local = part1.as_mut().unwrap(); }; } ```