embedded-hal
embedded-hal copied to clipboard
[RFC] [proposal] mmc: add types + traits for SD/MMC peripherals
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
asyncimplementation (?) - [x] Delay/wait functionality
- [x] Tuning
- [x] Interrupt configuration + handling
- [ ] FIFO configuration + handling
- [ ] DMA configuration + handling
- [x] SD/SDIO intialization