2022-03-03 17:37:42 -05:00
|
|
|
menu "SD/MMC Example Configuration"
|
2020-03-30 10:26:21 -04:00
|
|
|
|
|
|
|
config EXAMPLE_FORMAT_IF_MOUNT_FAILED
|
|
|
|
bool "Format the card if mount failed"
|
|
|
|
default n
|
|
|
|
help
|
|
|
|
If this config item is set, format_if_mount_failed will be set to true and the card will be formatted if
|
|
|
|
the mount has failed.
|
2022-03-03 17:37:42 -05:00
|
|
|
|
|
|
|
choice EXAMPLE_SDMMC_BUS_WIDTH
|
|
|
|
prompt "SD/MMC bus width"
|
|
|
|
default EXAMPLE_SDMMC_BUS_WIDTH_4
|
|
|
|
help
|
|
|
|
Select the bus width of SD or MMC interface.
|
|
|
|
Note that even if 1 line mode is used, D3 pin of the SD card must have a pull-up resistor connected.
|
|
|
|
Otherwise the card may enter SPI mode, the only way to recover from which is to cycle power to the card.
|
|
|
|
|
|
|
|
config EXAMPLE_SDMMC_BUS_WIDTH_4
|
|
|
|
bool "4 lines (D0 - D3)"
|
|
|
|
|
|
|
|
config EXAMPLE_SDMMC_BUS_WIDTH_1
|
|
|
|
bool "1 line (D0)"
|
|
|
|
endchoice
|
|
|
|
|
2023-03-08 00:15:14 -05:00
|
|
|
|
|
|
|
if IDF_TARGET_ESP32S3
|
2022-03-03 17:37:42 -05:00
|
|
|
|
|
|
|
config EXAMPLE_PIN_CMD
|
|
|
|
int "CMD GPIO number"
|
|
|
|
default 35 if IDF_TARGET_ESP32S3
|
|
|
|
|
|
|
|
config EXAMPLE_PIN_CLK
|
|
|
|
int "CLK GPIO number"
|
|
|
|
default 36 if IDF_TARGET_ESP32S3
|
|
|
|
|
|
|
|
config EXAMPLE_PIN_D0
|
|
|
|
int "D0 GPIO number"
|
|
|
|
default 37 if IDF_TARGET_ESP32S3
|
|
|
|
|
|
|
|
if EXAMPLE_SDMMC_BUS_WIDTH_4
|
|
|
|
|
|
|
|
config EXAMPLE_PIN_D1
|
|
|
|
int "D1 GPIO number"
|
|
|
|
default 38 if IDF_TARGET_ESP32S3
|
|
|
|
|
|
|
|
config EXAMPLE_PIN_D2
|
|
|
|
int "D2 GPIO number"
|
|
|
|
default 33 if IDF_TARGET_ESP32S3
|
|
|
|
|
|
|
|
config EXAMPLE_PIN_D3
|
|
|
|
int "D3 GPIO number"
|
|
|
|
default 34 if IDF_TARGET_ESP32S3
|
|
|
|
|
|
|
|
endif # EXAMPLE_SDMMC_BUS_WIDTH_4
|
|
|
|
|
2023-03-08 00:15:14 -05:00
|
|
|
endif # IDF_TARGET_ESP32S3
|
2022-03-03 17:37:42 -05:00
|
|
|
|
2020-03-30 10:26:21 -04:00
|
|
|
endmenu
|