Kconfig.projbuild 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. menu "Example Connection Configuration"
  2. choice EXAMPLE_CONNECT_INTERFACE
  3. prompt "Connect using"
  4. default EXAMPLE_CONNECT_WIFI
  5. help
  6. Protocol examples can use Wi-Fi or Ethernet to connect to the network.
  7. Choose which interface to use.
  8. config EXAMPLE_CONNECT_WIFI
  9. bool "Wi-Fi"
  10. config EXAMPLE_CONNECT_ETHERNET
  11. bool "Ethernet"
  12. endchoice
  13. if EXAMPLE_CONNECT_WIFI
  14. config EXAMPLE_WIFI_SSID
  15. string "WiFi SSID"
  16. default "myssid"
  17. help
  18. SSID (network name) for the example to connect to.
  19. config EXAMPLE_WIFI_PASSWORD
  20. string "WiFi Password"
  21. default "mypassword"
  22. help
  23. WiFi password (WPA or WPA2) for the example to use.
  24. Can be left blank if the network has no security set.
  25. endif
  26. if EXAMPLE_CONNECT_ETHERNET
  27. choice EXAMPLE_USE_ETHERNET
  28. prompt "Ethernet Type"
  29. default EXAMPLE_USE_INTERNAL_ETHERNET if IDF_TARGET_ESP32
  30. default EXAMPLE_USE_DM9051 if !IDF_TARGET_ESP32
  31. help
  32. Select which kind of Ethernet will be used in the example.
  33. config EXAMPLE_USE_INTERNAL_ETHERNET
  34. depends on IDF_TARGET_ESP32
  35. select ETH_USE_ESP32_EMAC
  36. bool "Internal EMAC"
  37. help
  38. Select internal Ethernet MAC controller.
  39. config EXAMPLE_USE_DM9051
  40. bool "DM9051 Module"
  41. select ETH_USE_SPI_ETHERNET
  42. select ETH_SPI_ETHERNET_DM9051
  43. help
  44. Select external SPI-Ethernet module.
  45. endchoice
  46. if EXAMPLE_USE_INTERNAL_ETHERNET
  47. choice EXAMPLE_ETH_PHY_MODEL
  48. prompt "Ethernet PHY Device"
  49. default EXAMPLE_ETH_PHY_IP101
  50. help
  51. Select the Ethernet PHY device to use in the example.
  52. config EXAMPLE_ETH_PHY_IP101
  53. bool "IP101"
  54. help
  55. IP101 is a single port 10/100 MII/RMII/TP/Fiber Fast Ethernet Transceiver.
  56. Goto http://www.icplus.com.tw/pp-IP101G.html for more information about it.
  57. config EXAMPLE_ETH_PHY_RTL8201
  58. bool "RTL8201/SR8201"
  59. help
  60. RTL8201F/SR8201F is a single port 10/100Mb Ethernet Transceiver with auto MDIX.
  61. Goto http://www.corechip-sz.com/productsview.asp?id=22 for more information about it.
  62. config EXAMPLE_ETH_PHY_LAN8720
  63. bool "LAN8720"
  64. help
  65. LAN8720A is a small footprint RMII 10/100 Ethernet Transceiver with HP Auto-MDIX Support.
  66. Goto https://www.microchip.com/LAN8720A for more information about it.
  67. config EXAMPLE_ETH_PHY_DP83848
  68. bool "DP83848"
  69. help
  70. DP83848 is a single port 10/100Mb/s Ethernet Physical Layer Transceiver.
  71. Goto http://www.ti.com/product/DP83848J for more information about it.
  72. endchoice
  73. config EXAMPLE_ETH_MDC_GPIO
  74. int "SMI MDC GPIO number"
  75. default 23
  76. help
  77. Set the GPIO number used by SMI MDC.
  78. config EXAMPLE_ETH_MDIO_GPIO
  79. int "SMI MDIO GPIO number"
  80. default 18
  81. help
  82. Set the GPIO number used by SMI MDIO.
  83. endif
  84. if EXAMPLE_USE_DM9051
  85. config EXAMPLE_DM9051_SPI_HOST
  86. int "SPI Host Number"
  87. range 0 2
  88. default 1
  89. help
  90. Set the SPI host used to communicate with DM9051.
  91. config EXAMPLE_DM9051_SCLK_GPIO
  92. int "SPI SCLK GPIO number"
  93. range 0 33
  94. default 19
  95. help
  96. Set the GPIO number used by SPI SCLK.
  97. config EXAMPLE_DM9051_MOSI_GPIO
  98. int "SPI MOSI GPIO number"
  99. range 0 33
  100. default 23
  101. help
  102. Set the GPIO number used by SPI MOSI.
  103. config EXAMPLE_DM9051_MISO_GPIO
  104. int "SPI MISO GPIO number"
  105. range 0 33
  106. default 25
  107. help
  108. Set the GPIO number used by SPI MISO.
  109. config EXAMPLE_DM9051_CS_GPIO
  110. int "SPI CS GPIO number"
  111. range 0 33
  112. default 22
  113. help
  114. Set the GPIO number used by SPI CS.
  115. config EXAMPLE_DM9051_SPI_CLOCK_MHZ
  116. int "SPI clock speed (MHz)"
  117. range 20 80
  118. default 20
  119. help
  120. Set the clock speed (MHz) of SPI interface.
  121. config EXAMPLE_DM9051_INT_GPIO
  122. int "Interrupt GPIO number"
  123. default 4
  124. help
  125. Set the GPIO number used by DM9051 interrupt.
  126. endif
  127. config EXAMPLE_ETH_PHY_RST_GPIO
  128. int "PHY Reset GPIO number"
  129. default 5
  130. help
  131. Set the GPIO number used to reset PHY chip.
  132. Set to -1 to disable PHY chip hardware reset.
  133. config EXAMPLE_ETH_PHY_ADDR
  134. int "PHY Address"
  135. range 0 31 if EXAMPLE_USE_INTERNAL_ETHERNET
  136. range 1 1 if !EXAMPLE_USE_INTERNAL_ETHERNET
  137. default 1
  138. help
  139. Set PHY address according your board schematic.
  140. endif
  141. config EXAMPLE_CONNECT_IPV6
  142. bool "Obtain IPv6 link-local address"
  143. default y
  144. help
  145. By default, examples will wait until IPv4 and IPv6 addresses are obtained.
  146. Disable this option if the network does not support IPv6.
  147. endmenu