macro_rules! for_each_sdmmc {
($($pattern:tt => $code:tt;)*) => { ... };
}Available on crate feature
_device-selected only.Expand description
This macro can be used to generate code for each slot of the SDMMC/SDIO host driver.
For an explanation on the general syntax, as well as usage of individual/repeated matchers, refer to the crate-level documentation.
This macro has one option for its “Individual matcher” case:
Syntax: ($slot:ident, $idx:literal, $iomux:literal, [$($clk:ident)?] [$($cmd_in:ident)?] [$($cmd_out:ident)?] [$($data_in:ident),*] [$($data_out:ident),*] [$($cd:ident)?] [$($wp:ident)?] [$($card_int:ident)?] [$($data_strobe:ident)?] [$($rst:ident)?])
Macro fragments:
$slot: the name of the slot (slot0,slot1).$idx: the zero-based slot index.$iomux:trueif the slot’s clock/command/data signals are IO_MUX-routed.$clk,$cmd_in,$cmd_out,$data_in,$data_out: GPIO-matrix bus signal names (absent for IO_MUX-routed slots).$cd,$wp,$card_int,$data_strobe,$rst: auxiliary signal names, each present only when the slot routes that signal through the GPIO matrix.
Each optional signal is wrapped in brackets so the branch shape stays uniform: a set
signal appears as [SIGNAL], an absent one as [].