Update SD_MMC.cpp (#4020)

According to ESP-IDF API
dc14d027ce/docs/en/api-reference/peripherals/sdmmc_host.rst :

"To configure the bus width, set the width field of :cpp:class:`sdmmc_slot_config_t`. For example, to set 1-line mode:

sdmmc_slot_config_t slot = SDMMC_SLOT_CONFIG_DEFAULT();
slot.width = 1;
"
This commit is contained in:
Verkehrsrot 2020-05-22 10:07:40 +02:00 committed by GitHub
parent 934841e236
commit 594ee6d249
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -64,6 +64,7 @@ bool SDMMCFS::begin(const char * mountpoint, bool mode1bit)
#endif #endif
if(mode1bit) { if(mode1bit) {
host.flags = SDMMC_HOST_FLAG_1BIT; //use 1-line SD mode host.flags = SDMMC_HOST_FLAG_1BIT; //use 1-line SD mode
slot_config.width = 1;
} }
esp_vfs_fat_sdmmc_mount_config_t mount_config = { esp_vfs_fat_sdmmc_mount_config_t mount_config = {