turgu1 / ESP-IDF-InkPlate

A porting effort to the ESP-IDF framework for the e-Radionica InkPlate software.
15 stars 9 forks source link

Fix SD card setup failure on ESP-IDF 4.2 #2

Closed mzyy94 closed 3 years ago

mzyy94 commented 3 years ago

This fixes #1

Description

Overwrite host_config->flags set by SDSPI_HOST_DEFAULT() with SDMMC_HOST_FLAG_SPI same as ESP-IDF 4.1.

ESP-IDF 4.1

.flags = SDMMC_HOST_FLAG_SPI, \

https://github.com/espressif/esp-idf/blob/v4.1/components/driver/include/driver/sdspi_host.h#L36

ESP-IDF 4.2

.flags = SDMMC_HOST_FLAG_SPI | SDMMC_HOST_FLAG_DEINIT_ARG, \

https://github.com/espressif/esp-idf/blob/v4.2/components/driver/include/driver/sdspi_host.h#L39