for_each_rmt_channel

Macro for_each_rmt_channel 

Source
macro_rules! for_each_rmt_channel {
    ($($pattern:tt => $code:tt;)*) => { ... };
}
Available on crate feature _device-selected only.
Expand description

This macro can be used to generate code for each channel of the RMT peripheral.

For an explanation on the general syntax, as well as usage of individual/repeated matchers, refer to the crate-level documentation.

This macro has three options for its “Individual matcher” case:

  • all: ($num:literal)
  • tx: ($num:literal, $idx:literal)
  • rx: ($num:literal, $idx:literal)

Macro fragments:

  • $num: number of the channel, e.g. 0
  • $idx: index of the channel among channels of the same capability, e.g. 0

Example data:

  • all: (0)
  • tx: (1, 1)
  • rx: (2, 0)