sdmmc: support SDIO over SPI

This commit is contained in:
michael
2018-12-29 02:04:37 +08:00
committed by Michael (XIAO Xufeng)
parent 3ec7bec6a7
commit 8a364b4bdf
12 changed files with 350 additions and 163 deletions
+5 -3
View File
@@ -106,11 +106,13 @@ esp_err_t sdmmc_init_io_bus_width(sdmmc_card_t* card)
esp_err_t sdmmc_io_enable_hs_mode(sdmmc_card_t* card)
{
card->max_freq_khz = SDMMC_FREQ_DEFAULT;
if (card->host.max_freq_khz <= card->max_freq_khz) {
/* Host is configured to use low frequency, don't attempt to switch */
/* If the host is configured to use low frequency, don't attempt to switch */
if (card->host.max_freq_khz < SDMMC_FREQ_DEFAULT) {
card->max_freq_khz = card->host.max_freq_khz;
return ESP_OK;
} else if (card->host.max_freq_khz < SDMMC_FREQ_HIGHSPEED) {
card->max_freq_khz = SDMMC_FREQ_DEFAULT;
return ESP_OK;
}
/* For IO cards, do write + read operation on "High Speed" register,