Skip to main content

Module sdmmc

Module sdmmc 

Source
Available on crate feature unstable only.
Expand description

§Secure Digital / MultiMedia Card host (SDMMC / SDIO)

§Overview

Driver for the SDMMC/SDIO host controller (SDHOST). The controller exposes up to two independent card slots that share a single transfer engine.

Blocking engine operations return BlockingError; BlockingError::Busy if another slot or an async transfer holds the engine. Async ops await the engine mutex instead. Bus width and card clock are cached and applied on engine acquire (lock order: engine, then settings).

§Configuration

SdHostController::new takes a Config for the shared module clock. Each slot is obtained via SdHostController::slot with a SlotConfig, then wired with with_clk, with_cmd, with_data*, and optional card-detect / write-protect pins.

§Usage

Blocking commands and block transfers are available on Slot in Blocking mode. Slot::into_async enables interrupt-driven operation and implements sdio::MmcBus for the sdio crate stack.

§Implementation State

SDIO device (I/O) mode is supported via sdio::MmcBus. SPI mode and UHS-I (1.8 V switching) are not implemented.

Structs§

CommandFlags
Per-command engine flags.
Config
Controller-wide (engine) configuration.
SdHostController
SDMMC / SDIO host controller driver.
Slot
A configured card slot, generic over the slot index and driver mode.
SlotConfig
Per-slot configuration.

Enums§

BlockingError
Error from blocking engine operations (BlockingError::Busy is mutex contention, not CIU HLE).
BusWidth
Card data bus width.
ClockSource
Card clock source feeding the controller’s divider.
ConfigError
Error returned when applying a Config.
DelayPhase
Clock input sampling phase used for high-speed tuning.
Error
Error returned by host operations.
ResponseLen
Length of the response a command expects.
SlotId
Selects one of the controller’s card slots.

Traits§

SlotClk
Card-clock output pin for slot S.
SlotCmd
Command (bidirectional) pin for slot S.
SlotData
Data line L (bidirectional) for slot S.