esp-idf/examples/protocols/http_server/file_serving/main/Kconfig.projbuild
Ivan Grokhotkov c8d1737d57
examples: file_serving: add support for ESP32-S3, refactoring
* Move filesystem mounting code into a separate file to simplify the
  main source file.
* Clean up SDMMC and SDSPI related code. Move pin configuration into
  Kconfig.
* Use same base_path ('/data') for either SPIFFS or SD. Remove the
  check in file_server.c about the base path.
* Update README according to the changes above.
2022-03-03 21:43:37 +01:00

99 lines
3.1 KiB
Plaintext

menu "HTTP file_serving example menu"
config EXAMPLE_MOUNT_SD_CARD
bool "Use SD card for file storage"
default n
help
If this config item is set, the file you upload to server can be chosen to save in the SDcard.
config EXAMPLE_FORMAT_IF_MOUNT_SDCARD_FAILED
bool "Format the card if mount failed"
default n
depends on EXAMPLE_MOUNT_SD_CARD
help
If this config item is set, the card will be formatted if mount has failed.
config EXAMPLE_USE_SDMMC_HOST
bool "Use SDMMC host"
default y
depends on EXAMPLE_MOUNT_SD_CARD && SOC_SDMMC_HOST_SUPPORTED
help
If this config item is set, SDMMC is used to mount the SDcard.
Otherwise, will use SPI host to access and mount the SDcard.
menu "SD card pin configuration (SPI)"
depends on EXAMPLE_MOUNT_SD_CARD && !EXAMPLE_USE_SDMMC_HOST
config EXAMPLE_PIN_MOSI
int "MOSI GPIO number"
default 15 if IDF_TARGET_ESP32
default 35 if IDF_TARGET_ESP32S2
default 35 if IDF_TARGET_ESP32S3
default 4 # C3 and others
config EXAMPLE_PIN_MISO
int "MISO GPIO number"
default 2 if IDF_TARGET_ESP32
default 37 if IDF_TARGET_ESP32S2
default 37 if IDF_TARGET_ESP32S3
default 6 # C3 and others
config EXAMPLE_PIN_CLK
int "CLK GPIO number"
default 14 if IDF_TARGET_ESP32
default 36 if IDF_TARGET_ESP32S2
default 36 if IDF_TARGET_ESP32S3
default 5 # C3 and others
config EXAMPLE_PIN_CS
int "CS GPIO number"
default 13 if IDF_TARGET_ESP32
default 34 if IDF_TARGET_ESP32S2
default 34 if IDF_TARGET_ESP32S3
default 1 # C3 and others
endmenu
menu "SD card pin configuration (SDMMC)"
depends on EXAMPLE_USE_SDMMC_HOST && SOC_SDMMC_USE_GPIO_MATRIX
config EXAMPLE_PIN_CMD
int "CMD GPIO number"
default 35 if IDF_TARGET_ESP32S3
default 1
config EXAMPLE_PIN_CLK
int "CLK GPIO number"
default 36 if IDF_TARGET_ESP32S3
default 2
config EXAMPLE_PIN_D0
int "D0 GPIO number"
default 37 if IDF_TARGET_ESP32S3
default 3
config EXAMPLE_PIN_D1
int "D1 GPIO number"
default 38 if IDF_TARGET_ESP32S3
default 4
config EXAMPLE_PIN_D2
int "D2 GPIO number"
default 33 if IDF_TARGET_ESP32S3
default 5
config EXAMPLE_PIN_D3
int "D3 GPIO number"
default 34 if IDF_TARGET_ESP32S3
default 6
endmenu
config EXAMPLE_HTTPD_CONN_CLOSE_HEADER
bool "Send connection close header from request handlers"
default y
help
If this config item is set, Connection: close header will be set in handlers.
This closes HTTP connection and frees the server socket instantly.
endmenu