Kconfig.projbuild 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  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_USE_SPI_ETHERNET
  86. bool
  87. choice EXAMPLE_ETHERNET_TYPE
  88. prompt "Ethernet Type"
  89. default EXAMPLE_USE_INTERNAL_ETHERNET if IDF_TARGET_ESP32
  90. default EXAMPLE_USE_W5500
  91. help
  92. Select which kind of Ethernet will be used in the example.
  93. config EXAMPLE_USE_INTERNAL_ETHERNET
  94. depends on IDF_TARGET_ESP32
  95. select ETH_USE_ESP32_EMAC
  96. bool "Internal EMAC"
  97. help
  98. Select internal Ethernet MAC controller.
  99. config EXAMPLE_USE_DM9051
  100. bool "DM9051 Module"
  101. select EXAMPLE_USE_SPI_ETHERNET
  102. select ETH_USE_SPI_ETHERNET
  103. select ETH_SPI_ETHERNET_DM9051
  104. help
  105. Select external SPI-Ethernet module.
  106. config EXAMPLE_USE_W5500
  107. bool "W5500 Module"
  108. select EXAMPLE_USE_SPI_ETHERNET
  109. select ETH_USE_SPI_ETHERNET
  110. select ETH_SPI_ETHERNET_W5500
  111. help
  112. Select external SPI-Ethernet module (W5500).
  113. config EXAMPLE_USE_OPENETH
  114. bool "OpenCores Ethernet MAC (EXPERIMENTAL)"
  115. select ETH_USE_OPENETH
  116. help
  117. When this option is enabled, the example is built with support for
  118. OpenCores Ethernet MAC, which allows testing the example in QEMU.
  119. Note that this option is used for internal testing purposes, and
  120. not officially supported. Examples built with this option enabled
  121. will not run on a real ESP32 chip.
  122. endchoice # EXAMPLE_ETHERNET_TYPE
  123. if EXAMPLE_USE_INTERNAL_ETHERNET
  124. choice EXAMPLE_ETH_PHY_MODEL
  125. prompt "Ethernet PHY Device"
  126. default EXAMPLE_ETH_PHY_IP101
  127. help
  128. Select the Ethernet PHY device to use in the example.
  129. config EXAMPLE_ETH_PHY_IP101
  130. bool "IP101"
  131. help
  132. IP101 is a single port 10/100 MII/RMII/TP/Fiber Fast Ethernet Transceiver.
  133. Goto http://www.icplus.com.tw/pp-IP101G.html for more information about it.
  134. config EXAMPLE_ETH_PHY_RTL8201
  135. bool "RTL8201/SR8201"
  136. help
  137. RTL8201F/SR8201F is a single port 10/100Mb Ethernet Transceiver with auto MDIX.
  138. Goto http://www.corechip-sz.com/productsview.asp?id=22 for more information about it.
  139. config EXAMPLE_ETH_PHY_LAN87XX
  140. bool "LAN87xx"
  141. help
  142. Below chips are supported:
  143. LAN8710A is a small footprint MII/RMII 10/100 Ethernet Transceiver with HP Auto-MDIX and
  144. flexPWR® Technology.
  145. LAN8720A is a small footprint RMII 10/100 Ethernet Transceiver with HP Auto-MDIX Support.
  146. LAN8740A/LAN8741A is a small footprint MII/RMII 10/100 Energy Efficient Ethernet Transceiver
  147. with HP Auto-MDIX and flexPWR® Technology.
  148. LAN8742A is a small footprint RMII 10/100 Ethernet Transceiver with HP Auto-MDIX and
  149. flexPWR® Technology.
  150. Goto https://www.microchip.com for more information about them.
  151. config EXAMPLE_ETH_PHY_DP83848
  152. bool "DP83848"
  153. help
  154. DP83848 is a single port 10/100Mb/s Ethernet Physical Layer Transceiver.
  155. Goto http://www.ti.com/product/DP83848J for more information about it.
  156. config EXAMPLE_ETH_PHY_KSZ80XX
  157. bool "KSZ80xx"
  158. help
  159. With the KSZ80xx series, Microchip offers single-chip 10BASE-T/100BASE-TX
  160. Ethernet Physical Layer Tranceivers (PHY).
  161. The following chips are supported: KSZ8001, KSZ8021, KSZ8031, KSZ8041,
  162. KSZ8051, KSZ8061, KSZ8081, KSZ8091
  163. Goto https://www.microchip.com for more information about them.
  164. endchoice
  165. config EXAMPLE_ETH_MDC_GPIO
  166. int "SMI MDC GPIO number"
  167. range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_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 ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_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 ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_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 ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_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 ENV_GPIO_RANGE_MIN ENV_GPIO_IN_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 ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_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 ENV_GPIO_RANGE_MIN ENV_GPIO_IN_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 ENV_GPIO_OUT_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