Struct esp_idf_svc::hal::spi::SpiDriver
source · pub struct SpiDriver<'d> { /* private fields */ }
Implementations§
source§impl<'d> SpiDriver<'d>
impl<'d> SpiDriver<'d>
sourcepub fn new<SPI>(
_spi: impl Peripheral<P = SPI> + 'd,
sclk: impl Peripheral<P = impl OutputPin> + 'd,
sdo: impl Peripheral<P = impl OutputPin> + 'd,
sdi: Option<impl Peripheral<P = impl InputPin> + 'd>,
config: &DriverConfig,
) -> Result<SpiDriver<'d>, EspError>where
SPI: SpiAnyPins,
pub fn new<SPI>(
_spi: impl Peripheral<P = SPI> + 'd,
sclk: impl Peripheral<P = impl OutputPin> + 'd,
sdo: impl Peripheral<P = impl OutputPin> + 'd,
sdi: Option<impl Peripheral<P = impl InputPin> + 'd>,
config: &DriverConfig,
) -> Result<SpiDriver<'d>, EspError>where
SPI: SpiAnyPins,
Create new instance of SPI controller for all others