Configuration for interfacing with SD cards. Currently only supports operation using FatFS filesystem
Only SDMMC1 is supported at this time.
Pins are fixed to the following: PC12 - SDMMC1 CK PD2 - SDMMC1 CMD PC8 - SDMMC1 D0 PC9 - SDMMC1 D1 (optional) PC10 - SDMMC1 D2 (optional) PC11 - SDMMC1 D3 (optional)
#include <sdmmc.h>
Classes | |
struct | Config |
Public Types | |
enum class | Result { OK , ERROR } |
enum class | BusWidth { BITS_1 , BITS_4 } |
enum class | Speed { SLOW , MEDIUM_SLOW , STANDARD , FAST , VERY_FAST } |
Public Member Functions | |
SdmmcHandler () | |
~SdmmcHandler () | |
Result | Init (const Config &cfg) |
|
strong |
Return values for the SdmmcHandler class
Enumerator | |
---|---|
OK | |
ERROR |
|
strong |
Sets the desired clock speed of the SD card bus.
Initialization is always done at or below 400kHz, and then the user speed is set.
|
inline |
|
inline |
Configures the SDMMC Peripheral with the user defined settings. Initialization does not happen immediatly and will be called by the filesystem (i.e. FatFS).