Kconfig.projbuild 12 KB

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