macro_rules! for_each_spi_slave {
($($pattern:tt => $code:tt;)*) => { ... };
}
Available on crate feature
_device-selected
only.Expand description
This macro can be used to generate code for each peripheral instance of the SPI slave 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: ($instance:ident, $sys:ident, $sclk:ident, $mosi:ident, $miso:ident, $cs:ident)
Macro fragments:
$instance
: the name of the I2C instance$sys
: the name of the instance as it is in theesp_hal::system::Peripheral
enum.$mosi
,$miso
,$cs
: signal names.
Example data: (SPI2, Spi2, FSPICLK, FSPID, FSPIQ, FSPICS0)