Macro shared_bus::new_xtensa
source · macro_rules! new_xtensa { ($bus_type:ty = $bus:expr) => { ... }; }
Expand description
Macro for creating a Xtensa-lx6 bus manager with 'static
lifetime.
This macro is a convenience helper for creating a bus manager that lives for the 'static
lifetime an thus can be safely shared across tasks/execution contexts (like interrupts).
This macro is only available with the xtensa
feature.
Syntax
ⓘ
let bus = shared_bus::new_xtensa!(<Full Bus Type Signature> = <bus>).unwrap();
The macro returns an Option which will be Some(&'static bus_manager)
on the first run and
None
afterwards. This is necessary to uphold safety around the inner static
variable.