stm32/sdcard: Add sdcard_select_sd/mmc functions.
So that C code can select which of SD or MMC to use. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
parent
7a9cf1f0fb
commit
75d2bfcccf
@ -200,6 +200,14 @@ void sdcard_init(void) {
|
||||
#endif
|
||||
}
|
||||
|
||||
void sdcard_select_sd(void) {
|
||||
pyb_sdmmc_flags |= PYB_SDMMC_FLAG_SD;
|
||||
}
|
||||
|
||||
void sdcard_select_mmc(void) {
|
||||
pyb_sdmmc_flags |= PYB_SDMMC_FLAG_MMC;
|
||||
}
|
||||
|
||||
STATIC void sdmmc_msp_init(void) {
|
||||
// enable SDIO clock
|
||||
SDMMC_CLK_ENABLE();
|
||||
|
@ -30,6 +30,8 @@
|
||||
#define SDCARD_BLOCK_SIZE (512)
|
||||
|
||||
void sdcard_init(void);
|
||||
void sdcard_select_sd(void);
|
||||
void sdcard_select_mmc(void);
|
||||
bool sdcard_is_present(void);
|
||||
bool sdcard_power_on(void);
|
||||
void sdcard_power_off(void);
|
||||
|
Loading…
Reference in New Issue
Block a user