Macro cortex_m_rtfm::peripherals
[−]
[src]
macro_rules! peripherals { ($device:ident, { $($PERIPHERAL:ident: Peripheral { register_block: $RegisterBlock:ident, ceiling: $C:ident, },)+ }) => { ... }; }
A macro to assign ceilings to peripherals
NOTE A peripheral instance, like RCC, can only be bound to a single ceiling. Trying to use this macro to bind the same peripheral to several ceiling will result in a compiler error.
Example
#[macro_use] extern crate cortex_m_rtfm; // device crate generated using `svd2rust` extern crate stm32f30x; peripherals!(stm32f30x, { GPIOA: Peripheral { register_block: Gpioa, ceiling: C1, }, RCC: Peripheral { register_block: Rcc, ceiling: C0, }, });