ariel_os::hal

Macro define_peripherals

macro_rules! define_peripherals {
    (
        $(#[$outer:meta])*
        $peripherals:ident {
            $(
                $(#[$inner:meta])*
                $peripheral_name:ident : $peripheral_field:ident $(=$peripheral_alias:ident)?
            ),*
            $(,)?
        }
    ) => { ... };
}
Expand description

This macro allows to obtain peripherals from the one listed in the peripherals module exported by this crate.

It makes sense to use this macro multiple times, coupled with conditional compilation (using the cfg attribute), to define different setups for different boards.

ยงNote

The define_peripherals! macro expects the ariel_os::hal::peripherals module to be in scope.