Skip to content

Commit

Permalink
Update SD_MMC.cpp (#4020)
Browse files Browse the repository at this point in the history
According to ESP-IDF API
https://github.com/espressif/esp-idf/blob/dc14d027cec49260b78efb1c3724b1710f2f3ec0/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;
"
  • Loading branch information
cyberman54 committed May 22, 2020
1 parent 934841e commit 594ee6d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libraries/SD_MMC/src/SD_MMC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ bool SDMMCFS::begin(const char * mountpoint, bool mode1bit)
#endif
if(mode1bit) {
host.flags = SDMMC_HOST_FLAG_1BIT; //use 1-line SD mode
slot_config.width = 1;
}

esp_vfs_fat_sdmmc_mount_config_t mount_config = {
Expand Down

1 comment on commit 594ee6d

@cyberman54
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on a olimex-poe-iso board, works.

Please sign in to comment.