Kconfig.projbuild 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  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. endif
  21. config EXAMPLE_CONNECT_ETHERNET
  22. bool "connect using Ethernet interface"
  23. default n
  24. help
  25. Protocol examples can use Wi-Fi and/or Ethernet to connect to the network.
  26. Choose this option to connect with Ethernet
  27. if EXAMPLE_CONNECT_ETHERNET
  28. choice EXAMPLE_USE_ETHERNET
  29. prompt "Ethernet Type"
  30. default EXAMPLE_USE_INTERNAL_ETHERNET if IDF_TARGET_ESP32
  31. default EXAMPLE_USE_DM9051 if !IDF_TARGET_ESP32
  32. help
  33. Select which kind of Ethernet will be used in the example.
  34. config EXAMPLE_USE_INTERNAL_ETHERNET
  35. depends on IDF_TARGET_ESP32
  36. select ETH_USE_ESP32_EMAC
  37. bool "Internal EMAC"
  38. help
  39. Select internal Ethernet MAC controller.
  40. config EXAMPLE_USE_DM9051
  41. bool "DM9051 Module"
  42. select ETH_USE_SPI_ETHERNET
  43. select ETH_SPI_ETHERNET_DM9051
  44. help
  45. Select external SPI-Ethernet module.
  46. config EXAMPLE_USE_OPENETH
  47. bool "OpenCores Ethernet MAC (EXPERIMENTAL)"
  48. select ETH_USE_OPENETH
  49. help
  50. When this option is enabled, the example is built with support for
  51. OpenCores Ethernet MAC, which allows testing the example in QEMU.
  52. Note that this option is used for internal testing purposes, and
  53. not officially supported. Examples built with this option enabled
  54. will not run on a real ESP32 chip.
  55. endchoice
  56. if EXAMPLE_USE_INTERNAL_ETHERNET
  57. choice EXAMPLE_ETH_PHY_MODEL
  58. prompt "Ethernet PHY Device"
  59. default EXAMPLE_ETH_PHY_IP101
  60. help
  61. Select the Ethernet PHY device to use in the example.
  62. config EXAMPLE_ETH_PHY_IP101
  63. bool "IP101"
  64. help
  65. IP101 is a single port 10/100 MII/RMII/TP/Fiber Fast Ethernet Transceiver.
  66. Goto http://www.icplus.com.tw/pp-IP101G.html for more information about it.
  67. config EXAMPLE_ETH_PHY_RTL8201
  68. bool "RTL8201/SR8201"
  69. help
  70. RTL8201F/SR8201F is a single port 10/100Mb Ethernet Transceiver with auto MDIX.
  71. Goto http://www.corechip-sz.com/productsview.asp?id=22 for more information about it.
  72. config EXAMPLE_ETH_PHY_LAN8720
  73. bool "LAN8720"
  74. help
  75. LAN8720A is a small footprint RMII 10/100 Ethernet Transceiver with HP Auto-MDIX Support.
  76. Goto https://www.microchip.com/LAN8720A for more information about it.
  77. config EXAMPLE_ETH_PHY_DP83848
  78. bool "DP83848"
  79. help
  80. DP83848 is a single port 10/100Mb/s Ethernet Physical Layer Transceiver.
  81. Goto http://www.ti.com/product/DP83848J for more information about it.
  82. endchoice
  83. config EXAMPLE_ETH_MDC_GPIO
  84. int "SMI MDC GPIO number"
  85. default 23
  86. help
  87. Set the GPIO number used by SMI MDC.
  88. config EXAMPLE_ETH_MDIO_GPIO
  89. int "SMI MDIO GPIO number"
  90. default 18
  91. help
  92. Set the GPIO number used by SMI MDIO.
  93. endif
  94. if EXAMPLE_USE_DM9051
  95. config EXAMPLE_DM9051_SPI_HOST
  96. int "SPI Host Number"
  97. range 0 2
  98. default 1
  99. help
  100. Set the SPI host used to communicate with DM9051.
  101. config EXAMPLE_DM9051_SCLK_GPIO
  102. int "SPI SCLK GPIO number"
  103. range 0 33
  104. default 19
  105. help
  106. Set the GPIO number used by SPI SCLK.
  107. config EXAMPLE_DM9051_MOSI_GPIO
  108. int "SPI MOSI GPIO number"
  109. range 0 33
  110. default 23
  111. help
  112. Set the GPIO number used by SPI MOSI.
  113. config EXAMPLE_DM9051_MISO_GPIO
  114. int "SPI MISO GPIO number"
  115. range 0 33
  116. default 25
  117. help
  118. Set the GPIO number used by SPI MISO.
  119. config EXAMPLE_DM9051_CS_GPIO
  120. int "SPI CS GPIO number"
  121. range 0 33
  122. default 22
  123. help
  124. Set the GPIO number used by SPI CS.
  125. config EXAMPLE_DM9051_SPI_CLOCK_MHZ
  126. int "SPI clock speed (MHz)"
  127. range 20 80
  128. default 20
  129. help
  130. Set the clock speed (MHz) of SPI interface.
  131. config EXAMPLE_DM9051_INT_GPIO
  132. int "Interrupt GPIO number"
  133. default 4
  134. help
  135. Set the GPIO number used by DM9051 interrupt.
  136. endif
  137. config EXAMPLE_ETH_PHY_RST_GPIO
  138. int "PHY Reset GPIO number"
  139. default 5
  140. help
  141. Set the GPIO number used to reset PHY chip.
  142. Set to -1 to disable PHY chip hardware reset.
  143. config EXAMPLE_ETH_PHY_ADDR
  144. int "PHY Address"
  145. range 0 31 if EXAMPLE_USE_INTERNAL_ETHERNET
  146. range 1 1 if !EXAMPLE_USE_INTERNAL_ETHERNET
  147. default 1
  148. help
  149. Set PHY address according your board schematic.
  150. endif
  151. config EXAMPLE_CONNECT_IPV6
  152. bool "Obtain IPv6 address"
  153. default y
  154. help
  155. By default, examples will wait until IPv4 and IPv6 local link addresses are obtained.
  156. Disable this option if the network does not support IPv6.
  157. Choose the preferred IPv6 address type if the connection code should wait until other than
  158. the local link address gets assigned.
  159. if EXAMPLE_CONNECT_IPV6
  160. choice EXAMPLE_CONNECT_PREFERRED_IPV6
  161. prompt "Preferred IPv6 Type"
  162. default EXAMPLE_CONNECT_IPV6_PREF_LOCAL_LINK
  163. help
  164. Select which kind of IPv6 address the connect logic waits for.
  165. config EXAMPLE_CONNECT_IPV6_PREF_LOCAL_LINK
  166. bool "Local Link Address"
  167. help
  168. Blocks until Local link address assigned.
  169. config EXAMPLE_CONNECT_IPV6_PREF_GLOBAL
  170. bool "Global Address"
  171. help
  172. Blocks until Global address assigned.
  173. config EXAMPLE_CONNECT_IPV6_PREF_SITE_LOCAL
  174. bool "Site Local Address"
  175. help
  176. Blocks until Site link address assigned.
  177. config EXAMPLE_CONNECT_IPV6_PREF_UNIQUE_LOCAL
  178. bool "Unique Local Link Address"
  179. help
  180. Blocks until Unique local address assigned.
  181. endchoice
  182. endif
  183. endmenu