Kconfig.projbuild 13 KB

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