Skip to main content

define_uarts

Macro define_uarts 

macro_rules! define_uarts {
    ( $( { $($args:tt)+ } ),* $(,)? ) => { ... };
}
Available on crate feature uart only.
Expand description

This macro defines types which can be used as peripherals in autostart tasks for accessing UARTs as defined in board descriptions.

Its argument is a comma-separated list of items that mostly go into repeated define_uart! calls (which define a struct type); see there.

In addition to that, type aliases are created for easier access; currently, that is only HOST_FACING_UART (an alias to the type of the host facing port, on boards with has_host_facing_uart).

While usable for applications just as well (to set up custom UARTs), it is most useful in board descriptions, because in addition to the individual exposed UARTs, it can also provide extra functionalities that take all UARTs into account.