Struct esp_idf_hal::spi::SpiDriver
source · pub struct SpiDriver<'d> { /* private fields */ }
Implementations§
source§impl<'d> SpiDriver<'d>
impl<'d> SpiDriver<'d>
sourcepub fn new<SPI: SpiAnyPins>(
_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<Self, EspError>
pub fn new<SPI: SpiAnyPins>( _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<Self, EspError>
Create new instance of SPI controller for all others