embedded-hal icon indicating copy to clipboard operation
embedded-hal copied to clipboard

[RFC] [proposal] mmc: add types + traits for SD/MMC peripherals

Open rmsyn opened this issue 6 months ago • 0 comments
trafficstars

SD/MMC Trait

This RFC proposal is to add a set of traits for abstracting common functionality for handling SD/MMC peripherals.

Why

Currently, drivers based on embedded-hal that implement the SD/MMC protocol, like embedded-sdmmc-rs, are based on the Spi traits.

However, traits that are more generally abstract over SD/MMC functionality will allow for a wider range of driver implementations.

For example, drivers for SD/SDIO/MMC peripherals, in various modes and specification versions.

Reference Implementation Requirements

This tracking issue is accompanied with a reference implementation to add the traits to embedded-hal:

  • sdmmc: add HAL traits for SD/MMC peripherals
    • [x] SD/SDIO intialization
      • variants for SPI quirks
    • [x] MMC initialization
      • variants for SPI quirks
    • [x] Sending commands to the device
    • [x] Reading responses from the device
    • [x] Data transfers (read/write)
    • [ ] Separate, related async implementation (?)
    • [x] Delay/wait functionality
    • [x] Tuning
    • [x] Interrupt configuration + handling
    • [ ] FIFO configuration + handling
    • [ ] DMA configuration + handling

rmsyn avatar Apr 23 '25 02:04 rmsyn