pub struct SdHostController<'d> { /* private fields */ }Expand description
SDMMC / SDIO host controller driver.
Owns the shared transfer engine and hands out per-slot handles.
Implementations§
Source§impl<'d> SdHostController<'d>
impl<'d> SdHostController<'d>
Sourcepub fn new(peri: SDHOST<'d>, config: Config) -> Result<Self, ConfigError>
pub fn new(peri: SDHOST<'d>, config: Config) -> Result<Self, ConfigError>
Creates the controller, enabling its bus clock and configuring the
shared (engine-wide) module clock from config.
Sourcepub fn slot<const S: u8>(
&self,
config: SlotConfig,
) -> Result<Slot<'_, S, Blocking>, ConfigError>
pub fn slot<const S: u8>( &self, config: SlotConfig, ) -> Result<Slot<'_, S, Blocking>, ConfigError>
Returns a builder for the given slot in blocking mode.
Both slots can be taken (once each); the shared engine serializes their
transactions. Requesting the same slot twice returns
ConfigError::SlotInUse. Blocking engine ops return
BlockingError::Busy on contention.
The returned slot borrows the controller, so the controller cannot be dropped while any of its slots are alive.