Kconfig.projbuild 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. menu "Example Configuration"
  2. config EXAMPLE_GPIO_RANGE_MIN
  3. int
  4. default 0
  5. config EXAMPLE_GPIO_RANGE_MAX
  6. int
  7. default 33 if IDF_TARGET_ESP32
  8. default 46 if IDF_TARGET_ESP32S2
  9. default 19 if IDF_TARGET_ESP32C3
  10. default 48 if IDF_TARGET_ESP32S3
  11. config EXAMPLE_STORE_HISTORY
  12. bool "Store command history in flash"
  13. default y
  14. help
  15. Linenoise line editing library provides functions to save and load
  16. command history. If this option is enabled, initalizes a FAT filesystem
  17. and uses it to store command history.
  18. config EXAMPLE_USE_SPI_ETHERNET
  19. bool
  20. choice EXAMPLE_ETHERNET_TYPE
  21. prompt "Ethernet Type"
  22. default EXAMPLE_USE_INTERNAL_ETHERNET if IDF_TARGET_ESP32
  23. default EXAMPLE_USE_W5500
  24. help
  25. Select which kind of Ethernet will be used in the example.
  26. config EXAMPLE_USE_INTERNAL_ETHERNET
  27. depends on IDF_TARGET_ESP32
  28. select ETH_USE_ESP32_EMAC
  29. bool "Internal EMAC"
  30. help
  31. Select internal Ethernet MAC controller.
  32. config EXAMPLE_USE_DM9051
  33. bool "DM9051 Module"
  34. select EXAMPLE_USE_SPI_ETHERNET
  35. select ETH_USE_SPI_ETHERNET
  36. select ETH_SPI_ETHERNET_DM9051
  37. help
  38. Select external SPI-Ethernet module (DM9051).
  39. config EXAMPLE_USE_W5500
  40. bool "W5500 Module"
  41. select EXAMPLE_USE_SPI_ETHERNET
  42. select ETH_USE_SPI_ETHERNET
  43. select ETH_SPI_ETHERNET_W5500
  44. help
  45. Select external SPI-Ethernet module (W5500).
  46. config EXAMPLE_USE_KSZ8851SNL
  47. bool "KSZ8851SNL Module"
  48. select EXAMPLE_USE_SPI_ETHERNET
  49. select ETH_USE_SPI_ETHERNET
  50. select ETH_SPI_ETHERNET_KSZ8851SNL
  51. help
  52. Select external SPI-Ethernet module (KSZ8851SNL).
  53. config EXAMPLE_USE_ENC28J60
  54. bool "ENC28J60 Module"
  55. select EXAMPLE_USE_SPI_ETHERNET
  56. select ETH_USE_SPI_ETHERNET
  57. select ETH_SPI_ETHERNET_ENC28J60
  58. help
  59. Select external SPI-Ethernet module (ENC28J60).
  60. endchoice # EXAMPLE_ETHERNET_TYPE
  61. if EXAMPLE_USE_INTERNAL_ETHERNET
  62. choice EXAMPLE_ETH_PHY_MODEL
  63. prompt "Ethernet PHY Device"
  64. default EXAMPLE_ETH_PHY_IP101
  65. help
  66. Select the Ethernet PHY device to use in the example.
  67. config EXAMPLE_ETH_PHY_IP101
  68. bool "IP101"
  69. help
  70. IP101 is a single port 10/100 MII/RMII/TP/Fiber Fast Ethernet Transceiver.
  71. Goto http://www.icplus.com.tw/pp-IP101G.html for more information about it.
  72. config EXAMPLE_ETH_PHY_RTL8201
  73. bool "RTL8201/SR8201"
  74. help
  75. RTL8201F/SR8201F is a single port 10/100Mb Ethernet Transceiver with auto MDIX.
  76. Goto http://www.corechip-sz.com/productsview.asp?id=22 for more information about it.
  77. config EXAMPLE_ETH_PHY_LAN87XX
  78. bool "LAN87xx"
  79. help
  80. Below chips are supported:
  81. LAN8710A is a small footprint MII/RMII 10/100 Ethernet Transceiver with HP Auto-MDIX and
  82. flexPWR® Technology.
  83. LAN8720A is a small footprint RMII 10/100 Ethernet Transceiver with HP Auto-MDIX Support.
  84. LAN8740A/LAN8741A is a small footprint MII/RMII 10/100 Energy Efficient Ethernet Transceiver
  85. with HP Auto-MDIX and flexPWR® Technology.
  86. LAN8742A is a small footprint RMII 10/100 Ethernet Transceiver with HP Auto-MDIX and
  87. flexPWR® Technology.
  88. Goto https://www.microchip.com for more information about them.
  89. config EXAMPLE_ETH_PHY_DP83848
  90. bool "DP83848"
  91. help
  92. DP83848 is a single port 10/100Mb/s Ethernet Physical Layer Transceiver.
  93. Goto http://www.ti.com/product/DP83848J for more information about it.
  94. config EXAMPLE_ETH_PHY_KSZ8041
  95. bool "KSZ8041"
  96. help
  97. The KSZ8041 is a single supply 10Base-T/100Base-TX Physical Layer Transceiver.
  98. Goto https://www.microchip.com/wwwproducts/en/KSZ8041 for more information about it.
  99. config EXAMPLE_ETH_PHY_KSZ8081
  100. bool "KSZ8081"
  101. help
  102. The KSZ8081 is a single supply 10Base-T/100Base-TX Physical Layer Transceiver.
  103. Goto https://www.microchip.com/wwwproducts/en/KSZ8081 for more information about it.
  104. endchoice # EXAMPLE_ETH_PHY_MODEL
  105. config EXAMPLE_ETH_MDC_GPIO
  106. int "SMI MDC GPIO number"
  107. range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
  108. default 23
  109. help
  110. Set the GPIO number used by SMI MDC.
  111. config EXAMPLE_ETH_MDIO_GPIO
  112. int "SMI MDIO GPIO number"
  113. range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
  114. default 18
  115. help
  116. Set the GPIO number used by SMI MDIO.
  117. endif # EXAMPLE_USE_INTERNAL_ETHERNET
  118. if EXAMPLE_USE_SPI_ETHERNET
  119. config EXAMPLE_ETH_SPI_HOST
  120. int "SPI Host Number"
  121. range 0 2
  122. default 1
  123. help
  124. Set the SPI host used to communicate with the SPI Ethernet Controller.
  125. config EXAMPLE_ETH_SPI_SCLK_GPIO
  126. int "SPI SCLK GPIO number"
  127. range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
  128. default 14 if IDF_TARGET_ESP32
  129. default 12 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
  130. default 6 if IDF_TARGET_ESP32C3
  131. help
  132. Set the GPIO number used by SPI SCLK.
  133. config EXAMPLE_ETH_SPI_MOSI_GPIO
  134. int "SPI MOSI GPIO number"
  135. range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
  136. default 13 if IDF_TARGET_ESP32
  137. default 11 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
  138. default 7 if IDF_TARGET_ESP32C3
  139. help
  140. Set the GPIO number used by SPI MOSI.
  141. config EXAMPLE_ETH_SPI_MISO_GPIO
  142. int "SPI MISO GPIO number"
  143. range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
  144. default 12 if IDF_TARGET_ESP32
  145. default 13 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
  146. default 2 if IDF_TARGET_ESP32C3
  147. help
  148. Set the GPIO number used by SPI MISO.
  149. config EXAMPLE_ETH_SPI_CS_GPIO
  150. int "SPI CS GPIO number"
  151. range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
  152. default 15 if IDF_TARGET_ESP32
  153. default 10 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3
  154. help
  155. Set the GPIO number used by SPI CS.
  156. config EXAMPLE_ETH_SPI_CLOCK_MHZ
  157. int "SPI clock speed (MHz)"
  158. range 5 80
  159. default 8 if EXAMPLE_USE_ENC28J60
  160. default 12 if IDF_TARGET_ESP32 || IDF_TARGET_ESP32C3
  161. default 36 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
  162. help
  163. Set the clock speed (MHz) of SPI interface.
  164. config EXAMPLE_ETH_SPI_INT_GPIO
  165. int "Interrupt GPIO number"
  166. range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
  167. default 4 if IDF_TARGET_ESP32 || IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3
  168. help
  169. Set the GPIO number used by the SPI Ethernet module interrupt line.
  170. endif # EXAMPLE_USE_SPI_ETHERNET
  171. config EXAMPLE_ETH_PHY_RST_GPIO
  172. int "PHY Reset GPIO number"
  173. range -1 EXAMPLE_GPIO_RANGE_MAX
  174. default 5
  175. help
  176. Set the GPIO number used to reset PHY chip.
  177. Set to -1 to disable PHY chip hardware reset.
  178. config EXAMPLE_ETH_PHY_ADDR
  179. int "PHY Address"
  180. range 0 31
  181. default 1
  182. help
  183. Set PHY address according your board schematic.
  184. if EXAMPLE_USE_ENC28J60
  185. choice EXAMPLE_ENC28J60_DUPLEX_MODE
  186. prompt "Duplex Mode"
  187. default EXAMPLE_ENC28J60_DUPLEX_HALF
  188. help
  189. Select ENC28J60 Duplex operation mode.
  190. config EXAMPLE_ENC28J60_DUPLEX_FULL
  191. bool "Full Duplex"
  192. help
  193. Set ENC28J60 to Full Duplex mode. Do not forget to manually set the remote node (switch, router
  194. or Ethernet controller) to full-duplex operation mode too.
  195. config EXAMPLE_ENC28J60_DUPLEX_HALF
  196. bool "Half Duplex"
  197. help
  198. Set ENC28J60 to Half Duplex mode.
  199. endchoice # EXAMPLE_ENC28J60_DUPLEX_MODE
  200. endif # ETH_SPI_ETHERNET_ENC28J60
  201. endmenu