Kconfig.projbuild 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  1. menu "Example Connection 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_CONNECT_WIFI
  12. bool "connect using WiFi interface"
  13. default y
  14. help
  15. Protocol examples can use Wi-Fi and/or Ethernet to connect to the network.
  16. Choose this option to connect with WiFi
  17. if EXAMPLE_CONNECT_WIFI
  18. config EXAMPLE_WIFI_SSID
  19. string "WiFi SSID"
  20. default "myssid"
  21. help
  22. SSID (network name) for the example to connect to.
  23. config EXAMPLE_WIFI_PASSWORD
  24. string "WiFi Password"
  25. default "mypassword"
  26. help
  27. WiFi password (WPA or WPA2) for the example to use.
  28. Can be left blank if the network has no security set.
  29. choice EXAMPLE_WIFI_SCAN_METHOD
  30. prompt "WiFi Scan Method"
  31. default EXAMPLE_WIFI_SCAN_METHOD_ALL_CHANNEL
  32. help
  33. WiFi scan method:
  34. If "Fast" is selected, scan will end after find SSID match AP.
  35. If "All Channel" is selected, scan will end after scan all the channel.
  36. config EXAMPLE_WIFI_SCAN_METHOD_FAST
  37. bool "Fast"
  38. config EXAMPLE_WIFI_SCAN_METHOD_ALL_CHANNEL
  39. bool "All Channel"
  40. endchoice
  41. menu "WiFi Scan threshold"
  42. config EXAMPLE_WIFI_SCAN_RSSI_THRESHOLD
  43. int "WiFi minimum rssi"
  44. range -127 0
  45. default -127
  46. help
  47. The minimum rssi to accept in the scan mode.
  48. choice EXAMPLE_WIFI_SCAN_AUTH_MODE_THRESHOLD
  49. prompt "WiFi Scan auth mode threshold"
  50. default EXAMPLE_WIFI_AUTH_OPEN
  51. help
  52. The weakest authmode to accept in the scan mode.
  53. config EXAMPLE_WIFI_AUTH_OPEN
  54. bool "OPEN"
  55. config EXAMPLE_WIFI_AUTH_WEP
  56. bool "WEP"
  57. config EXAMPLE_WIFI_AUTH_WPA_PSK
  58. bool "WPA PSK"
  59. config EXAMPLE_WIFI_AUTH_WPA2_PSK
  60. bool "WPA2 PSK"
  61. config EXAMPLE_WIFI_AUTH_WPA_WPA2_PSK
  62. bool "WPA WPA2 PSK"
  63. config EXAMPLE_WIFI_AUTH_WPA2_ENTERPRISE
  64. bool "WPA2 ENTERPRISE"
  65. config EXAMPLE_WIFI_AUTH_WPA3_PSK
  66. bool "WPA3 PSK"
  67. config EXAMPLE_WIFI_AUTH_WPA2_WPA3_PSK
  68. bool "WPA2 WPA3 PSK"
  69. config EXAMPLE_WIFI_AUTH_WAPI_PSK
  70. bool "WAPI PSK"
  71. endchoice
  72. endmenu
  73. choice EXAMPLE_WIFI_CONNECT_AP_SORT_METHOD
  74. prompt "WiFi Connect AP Sort Method"
  75. default EXAMPLE_WIFI_CONNECT_AP_BY_SIGNAL
  76. help
  77. WiFi connect AP sort method:
  78. If "Signal" is selected, Sort matched APs in scan list by RSSI.
  79. If "Security" is selected, Sort matched APs in scan list by security mode.
  80. config EXAMPLE_WIFI_CONNECT_AP_BY_SIGNAL
  81. bool "Signal"
  82. config EXAMPLE_WIFI_CONNECT_AP_BY_SECURITY
  83. bool "Security"
  84. endchoice
  85. endif
  86. config EXAMPLE_CONNECT_ETHERNET
  87. bool "connect using Ethernet interface"
  88. default n
  89. help
  90. Protocol examples can use Wi-Fi and/or Ethernet to connect to the network.
  91. Choose this option to connect with Ethernet
  92. if EXAMPLE_CONNECT_ETHERNET
  93. config EXAMPLE_USE_SPI_ETHERNET
  94. bool
  95. choice EXAMPLE_ETHERNET_TYPE
  96. prompt "Ethernet Type"
  97. default EXAMPLE_USE_INTERNAL_ETHERNET if IDF_TARGET_ESP32
  98. default EXAMPLE_USE_W5500
  99. help
  100. Select which kind of Ethernet will be used in the example.
  101. config EXAMPLE_USE_INTERNAL_ETHERNET
  102. depends on IDF_TARGET_ESP32
  103. select ETH_USE_ESP32_EMAC
  104. bool "Internal EMAC"
  105. help
  106. Select internal Ethernet MAC controller.
  107. config EXAMPLE_USE_DM9051
  108. bool "DM9051 Module"
  109. select EXAMPLE_USE_SPI_ETHERNET
  110. select ETH_USE_SPI_ETHERNET
  111. select ETH_SPI_ETHERNET_DM9051
  112. help
  113. Select external SPI-Ethernet module.
  114. config EXAMPLE_USE_W5500
  115. bool "W5500 Module"
  116. select EXAMPLE_USE_SPI_ETHERNET
  117. select ETH_USE_SPI_ETHERNET
  118. select ETH_SPI_ETHERNET_W5500
  119. help
  120. Select external SPI-Ethernet module (W5500).
  121. config EXAMPLE_USE_OPENETH
  122. bool "OpenCores Ethernet MAC (EXPERIMENTAL)"
  123. select ETH_USE_OPENETH
  124. help
  125. When this option is enabled, the example is built with support for
  126. OpenCores Ethernet MAC, which allows testing the example in QEMU.
  127. Note that this option is used for internal testing purposes, and
  128. not officially supported. Examples built with this option enabled
  129. will not run on a real ESP32 chip.
  130. endchoice # EXAMPLE_ETHERNET_TYPE
  131. if EXAMPLE_USE_INTERNAL_ETHERNET
  132. choice EXAMPLE_ETH_PHY_MODEL
  133. prompt "Ethernet PHY Device"
  134. default EXAMPLE_ETH_PHY_IP101
  135. help
  136. Select the Ethernet PHY device to use in the example.
  137. config EXAMPLE_ETH_PHY_IP101
  138. bool "IP101"
  139. help
  140. IP101 is a single port 10/100 MII/RMII/TP/Fiber Fast Ethernet Transceiver.
  141. Goto http://www.icplus.com.tw/pp-IP101G.html for more information about it.
  142. config EXAMPLE_ETH_PHY_RTL8201
  143. bool "RTL8201/SR8201"
  144. help
  145. RTL8201F/SR8201F is a single port 10/100Mb Ethernet Transceiver with auto MDIX.
  146. Goto http://www.corechip-sz.com/productsview.asp?id=22 for more information about it.
  147. config EXAMPLE_ETH_PHY_LAN87XX
  148. bool "LAN87xx"
  149. help
  150. Below chips are supported:
  151. LAN8710A is a small footprint MII/RMII 10/100 Ethernet Transceiver with HP Auto-MDIX and
  152. flexPWR® Technology.
  153. LAN8720A is a small footprint RMII 10/100 Ethernet Transceiver with HP Auto-MDIX Support.
  154. LAN8740A/LAN8741A is a small footprint MII/RMII 10/100 Energy Efficient Ethernet Transceiver
  155. with HP Auto-MDIX and flexPWR® Technology.
  156. LAN8742A is a small footprint RMII 10/100 Ethernet Transceiver with HP Auto-MDIX and
  157. flexPWR® Technology.
  158. Goto https://www.microchip.com for more information about them.
  159. config EXAMPLE_ETH_PHY_DP83848
  160. bool "DP83848"
  161. help
  162. DP83848 is a single port 10/100Mb/s Ethernet Physical Layer Transceiver.
  163. Goto http://www.ti.com/product/DP83848J for more information about it.
  164. endchoice
  165. config EXAMPLE_ETH_MDC_GPIO
  166. int "SMI MDC GPIO number"
  167. range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
  168. default 23
  169. help
  170. Set the GPIO number used by SMI MDC.
  171. config EXAMPLE_ETH_MDIO_GPIO
  172. int "SMI MDIO GPIO number"
  173. range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
  174. default 18
  175. help
  176. Set the GPIO number used by SMI MDIO.
  177. endif
  178. if EXAMPLE_USE_SPI_ETHERNET
  179. config EXAMPLE_ETH_SPI_HOST
  180. int "SPI Host Number"
  181. range 0 2
  182. default 1
  183. help
  184. Set the SPI host used to communicate with the SPI Ethernet Controller.
  185. config EXAMPLE_ETH_SPI_SCLK_GPIO
  186. int "SPI SCLK GPIO number"
  187. range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
  188. default 14
  189. help
  190. Set the GPIO number used by SPI SCLK.
  191. config EXAMPLE_ETH_SPI_MOSI_GPIO
  192. int "SPI MOSI GPIO number"
  193. range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
  194. default 13
  195. help
  196. Set the GPIO number used by SPI MOSI.
  197. config EXAMPLE_ETH_SPI_MISO_GPIO
  198. int "SPI MISO GPIO number"
  199. range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
  200. default 12
  201. help
  202. Set the GPIO number used by SPI MISO.
  203. config EXAMPLE_ETH_SPI_CS_GPIO
  204. int "SPI CS GPIO number"
  205. range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
  206. default 15
  207. help
  208. Set the GPIO number used by SPI CS.
  209. config EXAMPLE_ETH_SPI_CLOCK_MHZ
  210. int "SPI clock speed (MHz)"
  211. range 5 80
  212. default 36
  213. help
  214. Set the clock speed (MHz) of SPI interface.
  215. config EXAMPLE_ETH_SPI_INT_GPIO
  216. int "Interrupt GPIO number"
  217. range EXAMPLE_GPIO_RANGE_MIN EXAMPLE_GPIO_RANGE_MAX
  218. default 4
  219. help
  220. Set the GPIO number used by the SPI Ethernet module interrupt line.
  221. endif # EXAMPLE_USE_SPI_ETHERNET
  222. config EXAMPLE_ETH_PHY_RST_GPIO
  223. int "PHY Reset GPIO number"
  224. range -1 EXAMPLE_GPIO_RANGE_MAX
  225. default 5
  226. help
  227. Set the GPIO number used to reset PHY chip.
  228. Set to -1 to disable PHY chip hardware reset.
  229. config EXAMPLE_ETH_PHY_ADDR
  230. int "PHY Address"
  231. range 0 31 if EXAMPLE_USE_INTERNAL_ETHERNET
  232. default 1
  233. help
  234. Set PHY address according your board schematic.
  235. endif # EXAMPLE_CONNECT_ETHERNET
  236. config EXAMPLE_CONNECT_IPV6
  237. bool "Obtain IPv6 address"
  238. default y
  239. depends on EXAMPLE_CONNECT_WIFI || EXAMPLE_CONNECT_ETHERNET
  240. select LWIP_IPV6
  241. help
  242. By default, examples will wait until IPv4 and IPv6 local link addresses are obtained.
  243. Disable this option if the network does not support IPv6.
  244. Choose the preferred IPv6 address type if the connection code should wait until other than
  245. the local link address gets assigned.
  246. Consider enabling IPv6 stateless address autoconfiguration (SLAAC) in the LWIP component.
  247. if EXAMPLE_CONNECT_IPV6
  248. choice EXAMPLE_CONNECT_PREFERRED_IPV6
  249. prompt "Preferred IPv6 Type"
  250. default EXAMPLE_CONNECT_IPV6_PREF_LOCAL_LINK
  251. help
  252. Select which kind of IPv6 address the connect logic waits for.
  253. config EXAMPLE_CONNECT_IPV6_PREF_LOCAL_LINK
  254. bool "Local Link Address"
  255. help
  256. Blocks until Local link address assigned.
  257. config EXAMPLE_CONNECT_IPV6_PREF_GLOBAL
  258. bool "Global Address"
  259. help
  260. Blocks until Global address assigned.
  261. config EXAMPLE_CONNECT_IPV6_PREF_SITE_LOCAL
  262. bool "Site Local Address"
  263. help
  264. Blocks until Site link address assigned.
  265. config EXAMPLE_CONNECT_IPV6_PREF_UNIQUE_LOCAL
  266. bool "Unique Local Link Address"
  267. help
  268. Blocks until Unique local address assigned.
  269. endchoice
  270. endif
  271. endmenu