[][src]Macro ruspiro_register::define_registers

macro_rules! define_registers {
    ( $($name:ident : $access:ident<$t:ty> @ $addr:expr $(=> $fields:tt)?),* ) => { ... };
}
Deprecated since 0.3.0:

this macro definition syntax is deprectated to align the mmio syntax with the system register syntax. Please use define_mmio_register instead

Macro to provide multiple register definitions at once

Examples

This example is not tested

define_registers! [
    TIMERCLO: ReadOnly<u32> @ 0x3F00_3004,
    TIMERCHI: ReadOnly<u32> @ 0x3F00_3008,
    GPPUD: ReadWrite<u32> @ 0x3F20_0094 => [
        PUD OFFSET(0) BITS(2)
    ]
];

let tclo = TIMERCLO::Register.get();
let tchi = TIMERCHI::Register.get();