2018-07-04 19:01:03 -04:00
|
|
|
menu "Example Configuration"
|
|
|
|
|
2022-08-01 07:46:52 -04:00
|
|
|
orsource "$IDF_PATH/examples/common_components/env_caps/$IDF_TARGET/Kconfig.env_caps"
|
|
|
|
|
|
|
|
choice EXAMPLE_SDIO_INTERFACE
|
|
|
|
prompt "Interface to communicate with slave"
|
|
|
|
default EXAMPLE_SDIO_OVER_SDMMC
|
2018-08-23 08:43:07 -04:00
|
|
|
help
|
2022-08-01 07:46:52 -04:00
|
|
|
There are two interfaces to communicate with the SDIO slave: SDMMC and SPI.
|
|
|
|
The SDMMC interface is 8 times faster than the SPI interface. However not all Espressif chips have this
|
|
|
|
interface.
|
|
|
|
|
|
|
|
Alternatively you can use the SPI interface.
|
|
|
|
|
|
|
|
config EXAMPLE_SDIO_OVER_SDMMC
|
|
|
|
bool "SDMMC host"
|
|
|
|
depends on SOC_SDMMC_HOST_SUPPORTED
|
|
|
|
|
|
|
|
config EXAMPLE_SDIO_OVER_SPI
|
|
|
|
bool "SPI"
|
|
|
|
depends on IDF_TARGET_ESP32
|
|
|
|
endchoice
|
2018-08-23 08:43:07 -04:00
|
|
|
|
2019-05-09 10:43:06 -04:00
|
|
|
config EXAMPLE_SDIO_4BIT
|
2019-01-25 11:10:53 -05:00
|
|
|
bool "Host tries using 4-bit mode to communicate with slave"
|
|
|
|
default n
|
2019-05-09 10:43:06 -04:00
|
|
|
depends on !EXAMPLE_SDIO_OVER_SPI
|
2019-01-25 11:10:53 -05:00
|
|
|
help
|
|
|
|
If this is set, the host tries using 4-bit mode to communicate with
|
|
|
|
slave. If failed, the communication falls back to 1-bit mode.
|
|
|
|
|
|
|
|
If this is not set, the host uses 1-bit mode. However, CMD1 is still
|
|
|
|
mandatory for interrupts.
|
|
|
|
|
|
|
|
Note that 4-bit mode is not compatible (by default) if the slave is
|
|
|
|
using 3.3V flash which requires a pull-down on the MTDI pin.
|
|
|
|
|
2019-05-09 10:43:06 -04:00
|
|
|
config EXAMPLE_SDIO_HIGHSPEED
|
2019-01-25 11:10:53 -05:00
|
|
|
bool "Host tries using HS mode to communicate with slave"
|
|
|
|
default y
|
2022-08-01 07:46:52 -04:00
|
|
|
depends on EXAMPLE_SDIO_OVER_SDMMC
|
2019-01-25 11:10:53 -05:00
|
|
|
help
|
|
|
|
If this is set, the host tries using high-speed mode to communicate
|
|
|
|
with slave. If the slave doesn't support high-speed mode, the
|
|
|
|
communication falls back to default-speed mode. If this is not set,
|
|
|
|
the host uses DS mode.
|
|
|
|
|
|
|
|
If the example does not work, please try disabling the HS mode.
|
|
|
|
|
2022-08-01 07:46:52 -04:00
|
|
|
config EXAMPLE_ADJUSTABLE_PIN
|
|
|
|
bool
|
|
|
|
default EXAMPLE_SDIO_OVER_SPI || SOC_SDMMC_USE_GPIO_MATRIX
|
2019-12-24 02:57:44 -05:00
|
|
|
|
2022-08-01 07:46:52 -04:00
|
|
|
config EXAMPLE_PIN_CMD
|
|
|
|
int "CMD (MOSI) GPIO number"
|
|
|
|
depends on EXAMPLE_ADJUSTABLE_PIN
|
|
|
|
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
|
|
|
|
default 15
|
|
|
|
|
|
|
|
config EXAMPLE_PIN_CLK
|
|
|
|
int "CLK GPIO number"
|
|
|
|
depends on EXAMPLE_ADJUSTABLE_PIN
|
|
|
|
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
|
|
|
|
default 14
|
|
|
|
|
|
|
|
config EXAMPLE_PIN_D0
|
|
|
|
int "D0 (MISO) GPIO number"
|
|
|
|
depends on EXAMPLE_ADJUSTABLE_PIN
|
|
|
|
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
|
|
|
|
default 2
|
|
|
|
|
|
|
|
config EXAMPLE_PIN_D1
|
|
|
|
int "D1 (INTR) GPIO number"
|
|
|
|
depends on EXAMPLE_ADJUSTABLE_PIN
|
|
|
|
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
|
|
|
|
default 4
|
|
|
|
|
|
|
|
config EXAMPLE_PIN_D2
|
|
|
|
int "D2 GPIO number"
|
|
|
|
depends on EXAMPLE_ADJUSTABLE_PIN
|
|
|
|
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
|
|
|
|
default 12
|
|
|
|
|
|
|
|
config EXAMPLE_PIN_D3
|
|
|
|
int "D3 (CS) GPIO number"
|
|
|
|
depends on EXAMPLE_ADJUSTABLE_PIN
|
|
|
|
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
|
|
|
|
default 13
|
2019-12-24 02:57:44 -05:00
|
|
|
|
2019-01-25 11:10:53 -05:00
|
|
|
choice EXAMPLE_SLAVE
|
2019-09-19 10:51:22 -04:00
|
|
|
prompt "GPIO to control slave EN in Espressif master-slave board."
|
2019-01-25 11:10:53 -05:00
|
|
|
default EXAMPLE_SLAVE_NONE
|
|
|
|
help
|
2019-09-19 10:51:22 -04:00
|
|
|
If Espressif master-slave board is used, select the correct GPIO to control slave's EN.
|
2019-01-25 11:10:53 -05:00
|
|
|
|
|
|
|
config EXAMPLE_SLAVE_NONE
|
|
|
|
bool "Not using Espressif master-slave board."
|
|
|
|
config EXAMPLE_SLAVE_B1
|
|
|
|
bool "Using slave B1"
|
|
|
|
endchoice
|
2018-07-04 19:01:03 -04:00
|
|
|
|
2018-08-23 08:43:07 -04:00
|
|
|
config EXAMPLE_SLAVE_PWR_NEGTIVE_ACTIVE
|
|
|
|
bool "Slave power control pin is negtive active, otherwise postive active"
|
|
|
|
depends on !EXAMPLE_SLAVE_NONE
|
2019-09-19 10:51:22 -04:00
|
|
|
default n
|
2018-08-23 08:43:07 -04:00
|
|
|
help
|
|
|
|
Slave power control pin is negtive active, otherwise postive active
|
|
|
|
|
2022-08-01 07:46:52 -04:00
|
|
|
config EXAMPLE_NO_INTR_LINE
|
|
|
|
bool "The host is not connected to the interrupt line (DAT1) of slave"
|
|
|
|
default n
|
|
|
|
help
|
|
|
|
If this is set, the host example will not check the interrupt line but poll slave
|
|
|
|
registers to see whether the slave has interrupts for the host.
|
|
|
|
|
|
|
|
Working without the interrupt line may increase the CPU load of the host, and do harm
|
|
|
|
to the response speed to slave events, though can save 1 GPIO for other purposes in
|
|
|
|
non-4-bit mode.
|
|
|
|
|
2018-07-04 19:01:03 -04:00
|
|
|
endmenu
|