pub struct SdSpiHostDriver<'d, T> { /* private fields */ }Expand description
SPI Host driver for SD cards supporting the SPI protocol.
Implementations§
Source§impl<'d, T> SdSpiHostDriver<'d, T>where
T: Borrow<SpiDriver<'d>>,
impl<'d, T> SdSpiHostDriver<'d, T>where
T: Borrow<SpiDriver<'d>>,
Sourcepub fn new(
spi_driver: T,
cs: Option<impl OutputPin + 'd>,
cd: Option<impl InputPin + 'd>,
wp: Option<impl InputPin + 'd>,
int: Option<impl InputPin + 'd>,
wp_active_high: Option<bool>,
) -> Result<Self, EspError>where
T: Borrow<SpiDriver<'d>>,
pub fn new(
spi_driver: T,
cs: Option<impl OutputPin + 'd>,
cd: Option<impl InputPin + 'd>,
wp: Option<impl InputPin + 'd>,
int: Option<impl InputPin + 'd>,
wp_active_high: Option<bool>,
) -> Result<Self, EspError>where
T: Borrow<SpiDriver<'d>>,
Create a new SPI host driver for SD cards
§Arguments
- spi_driver: SPI peripheral driver
- cs: Chip Select pin (optional)
- cd: Card Detect pin (optional)
- wp: Write Protect pin (optional)
- int: Interrupt pin (optional)
- wp_active_high: Write Protect active when high (optional, default =
false)