mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
150 lines
4.4 KiB
Plaintext
150 lines
4.4 KiB
Plaintext
menu "SD/MMC Example Configuration"
|
|
|
|
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.
|
|
|
|
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
|
|
|
|
if SOC_SDMMC_USE_GPIO_MATRIX
|
|
|
|
config EXAMPLE_PIN_CMD
|
|
int "CMD GPIO number"
|
|
default 35 if IDF_TARGET_ESP32S3
|
|
default 44 if IDF_TARGET_ESP32P4
|
|
|
|
config EXAMPLE_PIN_CLK
|
|
int "CLK GPIO number"
|
|
default 36 if IDF_TARGET_ESP32S3
|
|
default 43 if IDF_TARGET_ESP32P4
|
|
|
|
config EXAMPLE_PIN_D0
|
|
int "D0 GPIO number"
|
|
default 37 if IDF_TARGET_ESP32S3
|
|
default 39 if IDF_TARGET_ESP32P4
|
|
|
|
if EXAMPLE_SDMMC_BUS_WIDTH_4
|
|
|
|
config EXAMPLE_PIN_D1
|
|
int "D1 GPIO number"
|
|
default 38 if IDF_TARGET_ESP32S3
|
|
default 40 if IDF_TARGET_ESP32P4
|
|
|
|
config EXAMPLE_PIN_D2
|
|
int "D2 GPIO number"
|
|
default 33 if IDF_TARGET_ESP32S3
|
|
default 41 if IDF_TARGET_ESP32P4
|
|
|
|
config EXAMPLE_PIN_D3
|
|
int "D3 GPIO number"
|
|
default 34 if IDF_TARGET_ESP32S3
|
|
default 42 if IDF_TARGET_ESP32P4
|
|
|
|
endif # EXAMPLE_SDMMC_BUS_WIDTH_4
|
|
|
|
endif # SOC_SDMMC_USE_GPIO_MATRIX
|
|
|
|
config EXAMPLE_DEBUG_PIN_CONNECTIONS
|
|
bool "Debug sd pin connections and pullup strength"
|
|
default n
|
|
|
|
if !SOC_SDMMC_USE_GPIO_MATRIX
|
|
config EXAMPLE_PIN_CMD
|
|
depends on EXAMPLE_DEBUG_PIN_CONNECTIONS
|
|
default 15 if IDF_TARGET_ESP32
|
|
|
|
config EXAMPLE_PIN_CLK
|
|
depends on EXAMPLE_DEBUG_PIN_CONNECTIONS
|
|
default 14 if IDF_TARGET_ESP32
|
|
|
|
config EXAMPLE_PIN_D0
|
|
depends on EXAMPLE_DEBUG_PIN_CONNECTIONS
|
|
default 2 if IDF_TARGET_ESP32
|
|
|
|
if EXAMPLE_SDMMC_BUS_WIDTH_4
|
|
|
|
config EXAMPLE_PIN_D1
|
|
depends on EXAMPLE_DEBUG_PIN_CONNECTIONS
|
|
default 4 if IDF_TARGET_ESP32
|
|
|
|
config EXAMPLE_PIN_D2
|
|
depends on EXAMPLE_DEBUG_PIN_CONNECTIONS
|
|
default 12 if IDF_TARGET_ESP32
|
|
|
|
config EXAMPLE_PIN_D3
|
|
depends on EXAMPLE_DEBUG_PIN_CONNECTIONS
|
|
default 13 if IDF_TARGET_ESP32
|
|
|
|
endif # EXAMPLE_SDMMC_BUS_WIDTH_4
|
|
endif
|
|
|
|
config EXAMPLE_ENABLE_ADC_FEATURE
|
|
bool "Enable ADC feature"
|
|
depends on EXAMPLE_DEBUG_PIN_CONNECTIONS
|
|
default y if IDF_TARGET_ESP32
|
|
default n
|
|
|
|
config EXAMPLE_ADC_UNIT
|
|
int "ADC Unit"
|
|
depends on EXAMPLE_ENABLE_ADC_FEATURE
|
|
default 1 if IDF_TARGET_ESP32
|
|
default 1
|
|
|
|
config EXAMPLE_ADC_PIN_CLK
|
|
int "CLK mapped ADC pin"
|
|
depends on EXAMPLE_ENABLE_ADC_FEATURE
|
|
default 6 if IDF_TARGET_ESP32
|
|
default 1
|
|
|
|
config EXAMPLE_ADC_PIN_CMD
|
|
int "CMD mapped ADC pin"
|
|
depends on EXAMPLE_ENABLE_ADC_FEATURE
|
|
default 3 if IDF_TARGET_ESP32
|
|
default 1
|
|
|
|
config EXAMPLE_ADC_PIN_D0
|
|
int "D0 mapped ADC pin"
|
|
depends on EXAMPLE_ENABLE_ADC_FEATURE
|
|
default 2 if IDF_TARGET_ESP32
|
|
default 1
|
|
|
|
if EXAMPLE_SDMMC_BUS_WIDTH_4
|
|
|
|
config EXAMPLE_ADC_PIN_D1
|
|
int "D1 mapped ADC pin"
|
|
depends on EXAMPLE_ENABLE_ADC_FEATURE
|
|
default 0 if IDF_TARGET_ESP32
|
|
default 1
|
|
|
|
config EXAMPLE_ADC_PIN_D2
|
|
int "D2 mapped ADC pin"
|
|
depends on EXAMPLE_ENABLE_ADC_FEATURE
|
|
default 5 if IDF_TARGET_ESP32
|
|
default 1
|
|
|
|
config EXAMPLE_ADC_PIN_D3
|
|
int "D3 mapped ADC pin"
|
|
depends on EXAMPLE_ENABLE_ADC_FEATURE
|
|
default 4 if IDF_TARGET_ESP32
|
|
default 1
|
|
|
|
endif # EXAMPLE_SDMMC_BUS_WIDTH_4
|
|
|
|
endmenu
|