Kconfig.projbuild 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. menu "Example Configuration"
  2. orsource "$IDF_PATH/examples/common_components/env_caps/$IDF_TARGET/Kconfig.env_caps"
  3. choice EXAMPLE_SDIO_INTERFACE
  4. prompt "Interface to communicate with slave"
  5. default EXAMPLE_SDIO_OVER_SDMMC
  6. help
  7. There are two interfaces to communicate with the SDIO slave: SDMMC and SPI.
  8. The SDMMC interface is 8 times faster than the SPI interface. However not all Espressif chips have this
  9. interface.
  10. Alternatively you can use the SPI interface.
  11. config EXAMPLE_SDIO_OVER_SDMMC
  12. bool "SDMMC host"
  13. depends on SOC_SDMMC_HOST_SUPPORTED
  14. config EXAMPLE_SDIO_OVER_SPI
  15. bool "SPI"
  16. depends on IDF_TARGET_ESP32
  17. endchoice
  18. config EXAMPLE_SDIO_4BIT
  19. bool "Host tries using 4-bit mode to communicate with slave"
  20. default n
  21. depends on !EXAMPLE_SDIO_OVER_SPI
  22. help
  23. If this is set, the host tries using 4-bit mode to communicate with
  24. slave. If failed, the communication falls back to 1-bit mode.
  25. If this is not set, the host uses 1-bit mode. However, CMD1 is still
  26. mandatory for interrupts.
  27. Note that 4-bit mode is not compatible (by default) if the slave is
  28. using 3.3V flash which requires a pull-down on the MTDI pin.
  29. config EXAMPLE_SDIO_HIGHSPEED
  30. bool "Host tries using HS mode to communicate with slave"
  31. default y
  32. depends on EXAMPLE_SDIO_OVER_SDMMC
  33. help
  34. If this is set, the host tries using high-speed mode to communicate
  35. with slave. If the slave doesn't support high-speed mode, the
  36. communication falls back to default-speed mode. If this is not set,
  37. the host uses DS mode.
  38. If the example does not work, please try disabling the HS mode.
  39. config EXAMPLE_ADJUSTABLE_PIN
  40. bool
  41. default EXAMPLE_SDIO_OVER_SPI || SOC_SDMMC_USE_GPIO_MATRIX
  42. config EXAMPLE_PIN_CMD
  43. int "CMD (MOSI) GPIO number"
  44. depends on EXAMPLE_ADJUSTABLE_PIN
  45. range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
  46. default 15
  47. config EXAMPLE_PIN_CLK
  48. int "CLK GPIO number"
  49. depends on EXAMPLE_ADJUSTABLE_PIN
  50. range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
  51. default 14
  52. config EXAMPLE_PIN_D0
  53. int "D0 (MISO) GPIO number"
  54. depends on EXAMPLE_ADJUSTABLE_PIN
  55. range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
  56. default 2
  57. config EXAMPLE_PIN_D1
  58. int "D1 (INTR) GPIO number"
  59. depends on EXAMPLE_ADJUSTABLE_PIN
  60. range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
  61. default 4
  62. config EXAMPLE_PIN_D2
  63. int "D2 GPIO number"
  64. depends on EXAMPLE_ADJUSTABLE_PIN
  65. range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
  66. default 12
  67. config EXAMPLE_PIN_D3
  68. int "D3 (CS) GPIO number"
  69. depends on EXAMPLE_ADJUSTABLE_PIN
  70. range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
  71. default 13
  72. choice EXAMPLE_SLAVE
  73. prompt "GPIO to control slave EN in Espressif master-slave board."
  74. default EXAMPLE_SLAVE_NONE
  75. help
  76. If Espressif master-slave board is used, select the correct GPIO to control slave's EN.
  77. config EXAMPLE_SLAVE_NONE
  78. bool "Not using Espressif master-slave board."
  79. config EXAMPLE_SLAVE_B1
  80. bool "Using slave B1"
  81. endchoice
  82. config EXAMPLE_SLAVE_PWR_NEGTIVE_ACTIVE
  83. bool "Slave power control pin is negtive active, otherwise postive active"
  84. depends on !EXAMPLE_SLAVE_NONE
  85. default n
  86. help
  87. Slave power control pin is negtive active, otherwise postive active
  88. config EXAMPLE_NO_INTR_LINE
  89. bool "The host is not connected to the interrupt line (DAT1) of slave"
  90. default n
  91. help
  92. If this is set, the host example will not check the interrupt line but poll slave
  93. registers to see whether the slave has interrupts for the host.
  94. Working without the interrupt line may increase the CPU load of the host, and do harm
  95. to the response speed to slave events, though can save 1 GPIO for other purposes in
  96. non-4-bit mode.
  97. endmenu