diff --git a/examples/common_components/protocol_examples_common/Kconfig.projbuild b/examples/common_components/protocol_examples_common/Kconfig.projbuild index 56a6f9c952..e3275ec3f4 100644 --- a/examples/common_components/protocol_examples_common/Kconfig.projbuild +++ b/examples/common_components/protocol_examples_common/Kconfig.projbuild @@ -30,7 +30,10 @@ menu "Example Connection Configuration" Choose this option to connect with Ethernet if EXAMPLE_CONNECT_ETHERNET - choice EXAMPLE_USE_ETHERNET + config EXAMPLE_USE_SPI_ETHERNET + bool + + choice EXAMPLE_ETHERNET_TYPE prompt "Ethernet Type" default EXAMPLE_USE_INTERNAL_ETHERNET if IDF_TARGET_ESP32 default EXAMPLE_USE_W5500 @@ -46,6 +49,7 @@ menu "Example Connection Configuration" config EXAMPLE_USE_DM9051 bool "DM9051 Module" + select EXAMPLE_USE_SPI_ETHERNET select ETH_USE_SPI_ETHERNET select ETH_SPI_ETHERNET_DM9051 help @@ -53,6 +57,7 @@ menu "Example Connection Configuration" config EXAMPLE_USE_W5500 bool "W5500 Module" + select EXAMPLE_USE_SPI_ETHERNET select ETH_USE_SPI_ETHERNET select ETH_SPI_ETHERNET_W5500 help @@ -68,7 +73,7 @@ menu "Example Connection Configuration" not officially supported. Examples built with this option enabled will not run on a real ESP32 chip. - endchoice + endchoice # EXAMPLE_ETHERNET_TYPE if EXAMPLE_USE_INTERNAL_ETHERNET choice EXAMPLE_ETH_PHY_MODEL @@ -115,7 +120,7 @@ menu "Example Connection Configuration" Set the GPIO number used by SMI MDIO. endif - if ETH_USE_SPI_ETHERNET + if EXAMPLE_USE_SPI_ETHERNET config EXAMPLE_ETH_SPI_HOST int "SPI Host Number" range 0 2 @@ -163,7 +168,7 @@ menu "Example Connection Configuration" default 4 help Set the GPIO number used by the SPI Ethernet module interrupt line. - endif # ETH_USE_SPI_ETHERNET + endif # EXAMPLE_USE_SPI_ETHERNET config EXAMPLE_ETH_PHY_RST_GPIO int "PHY Reset GPIO number" @@ -178,7 +183,7 @@ menu "Example Connection Configuration" default 1 help Set PHY address according your board schematic. - endif + endif # EXAMPLE_CONNECT_ETHERNET config EXAMPLE_CONNECT_IPV6 bool "Obtain IPv6 address" diff --git a/examples/ethernet/basic/main/Kconfig.projbuild b/examples/ethernet/basic/main/Kconfig.projbuild index 6396145752..ba7eec45c6 100644 --- a/examples/ethernet/basic/main/Kconfig.projbuild +++ b/examples/ethernet/basic/main/Kconfig.projbuild @@ -1,5 +1,9 @@ menu "Example Configuration" - choice EXAMPLE_USE_ETHERNET + + config EXAMPLE_USE_SPI_ETHERNET + bool + + choice EXAMPLE_ETHERNET_TYPE prompt "Ethernet Type" default EXAMPLE_USE_INTERNAL_ETHERNET if IDF_TARGET_ESP32 default EXAMPLE_USE_W5500 @@ -15,6 +19,7 @@ menu "Example Configuration" config EXAMPLE_USE_DM9051 bool "DM9051 Module" + select EXAMPLE_USE_SPI_ETHERNET select ETH_USE_SPI_ETHERNET select ETH_SPI_ETHERNET_DM9051 help @@ -22,11 +27,12 @@ menu "Example Configuration" config EXAMPLE_USE_W5500 bool "W5500 Module" + select EXAMPLE_USE_SPI_ETHERNET select ETH_USE_SPI_ETHERNET select ETH_SPI_ETHERNET_W5500 help Select external SPI-Ethernet module (W5500). - endchoice # EXAMPLE_USE_ETHERNET + endchoice # EXAMPLE_ETHERNET_TYPE if EXAMPLE_USE_INTERNAL_ETHERNET choice EXAMPLE_ETH_PHY_MODEL @@ -79,7 +85,7 @@ menu "Example Configuration" Set the GPIO number used by SMI MDIO. endif # EXAMPLE_USE_INTERNAL_ETHERNET - if ETH_USE_SPI_ETHERNET + if EXAMPLE_USE_SPI_ETHERNET config EXAMPLE_ETH_SPI_HOST int "SPI Host Number" range 0 2 @@ -127,7 +133,7 @@ menu "Example Configuration" default 4 help Set the GPIO number used by the SPI Ethernet module interrupt line. - endif # ETH_USE_SPI_ETHERNET + endif # EXAMPLE_USE_SPI_ETHERNET config EXAMPLE_ETH_PHY_RST_GPIO int "PHY Reset GPIO number" diff --git a/examples/ethernet/eth2ap/main/Kconfig.projbuild b/examples/ethernet/eth2ap/main/Kconfig.projbuild index a45d94c847..4e2dba5ed4 100644 --- a/examples/ethernet/eth2ap/main/Kconfig.projbuild +++ b/examples/ethernet/eth2ap/main/Kconfig.projbuild @@ -1,5 +1,9 @@ menu "Example Configuration" - choice EXAMPLE_USE_ETHERNET + + config EXAMPLE_USE_SPI_ETHERNET + bool + + choice EXAMPLE_ETHERNET_TYPE prompt "Ethernet Type" default EXAMPLE_USE_INTERNAL_ETHERNET if IDF_TARGET_ESP32 default EXAMPLE_USE_W5500 @@ -15,6 +19,7 @@ menu "Example Configuration" config EXAMPLE_USE_DM9051 bool "DM9051 Module" + select EXAMPLE_USE_SPI_ETHERNET select ETH_USE_SPI_ETHERNET select ETH_SPI_ETHERNET_DM9051 help @@ -22,11 +27,12 @@ menu "Example Configuration" config EXAMPLE_USE_W5500 bool "W5500 Module" + select EXAMPLE_USE_SPI_ETHERNET select ETH_USE_SPI_ETHERNET select ETH_SPI_ETHERNET_W5500 help Select external SPI-Ethernet module (W5500). - endchoice # EXAMPLE_USE_ETHERNET + endchoice # EXAMPLE_ETHERNET_TYPE if EXAMPLE_USE_INTERNAL_ETHERNET choice EXAMPLE_ETH_PHY_MODEL @@ -79,7 +85,7 @@ menu "Example Configuration" Set the GPIO number used by SMI MDIO. endif # EXAMPLE_USE_INTERNAL_ETHERNET - if ETH_USE_SPI_ETHERNET + if EXAMPLE_USE_SPI_ETHERNET config EXAMPLE_ETH_SPI_HOST int "SPI Host Number" range 0 2 @@ -127,7 +133,7 @@ menu "Example Configuration" default 4 help Set the GPIO number used by the SPI Ethernet module interrupt line. - endif # ETH_USE_SPI_ETHERNET + endif # EXAMPLE_USE_SPI_ETHERNET config EXAMPLE_ETH_PHY_RST_GPIO int "PHY Reset GPIO number" diff --git a/examples/ethernet/iperf/main/Kconfig.projbuild b/examples/ethernet/iperf/main/Kconfig.projbuild index c7f3a24752..ab5dd7473f 100644 --- a/examples/ethernet/iperf/main/Kconfig.projbuild +++ b/examples/ethernet/iperf/main/Kconfig.projbuild @@ -7,7 +7,10 @@ menu "Example Configuration" command history. If this option is enabled, initalizes a FAT filesystem and uses it to store command history. - choice EXAMPLE_USE_ETHERNET + config EXAMPLE_USE_SPI_ETHERNET + bool + + choice EXAMPLE_ETHERNET_TYPE prompt "Ethernet Type" default EXAMPLE_USE_INTERNAL_ETHERNET if IDF_TARGET_ESP32 default EXAMPLE_USE_W5500 @@ -23,6 +26,7 @@ menu "Example Configuration" config EXAMPLE_USE_DM9051 bool "DM9051 Module" + select EXAMPLE_USE_SPI_ETHERNET select ETH_USE_SPI_ETHERNET select ETH_SPI_ETHERNET_DM9051 help @@ -30,11 +34,12 @@ menu "Example Configuration" config EXAMPLE_USE_W5500 bool "W5500 Module" + select EXAMPLE_USE_SPI_ETHERNET select ETH_USE_SPI_ETHERNET select ETH_SPI_ETHERNET_W5500 help Select external SPI-Ethernet module (W5500). - endchoice # EXAMPLE_USE_ETHERNET + endchoice # EXAMPLE_ETHERNET_TYPE if EXAMPLE_USE_INTERNAL_ETHERNET choice EXAMPLE_ETH_PHY_MODEL @@ -87,7 +92,7 @@ menu "Example Configuration" Set the GPIO number used by SMI MDIO. endif # EXAMPLE_USE_INTERNAL_ETHERNET - if ETH_USE_SPI_ETHERNET + if EXAMPLE_USE_SPI_ETHERNET config EXAMPLE_ETH_SPI_HOST int "SPI Host Number" range 0 2 @@ -135,7 +140,7 @@ menu "Example Configuration" default 4 help Set the GPIO number used by the SPI Ethernet module interrupt line. - endif # ETH_USE_SPI_ETHERNET + endif # EXAMPLE_USE_SPI_ETHERNET config EXAMPLE_ETH_PHY_RST_GPIO int "PHY Reset GPIO number"