Kconfig.projbuild 10 KB

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