From 9a0803ad7e80d2ae0f0edb98ebec284181da0664 Mon Sep 17 00:00:00 2001 From: Roland Dobai Date: Thu, 9 May 2019 16:43:06 +0200 Subject: [PATCH] Rename Kconfig options (examples) * Original commit: espressif/esp-idf@151f757912c0de4bc85ad1d2c68c8ce743914ca5 --- .../Kconfig.projbuild | 44 +++++++++---------- .../protocol_examples_common/connect.c | 20 ++++----- examples/protocols/mdns/README.md | 2 +- .../protocols/mdns/main/Kconfig.projbuild | 2 +- .../protocols/mdns/main/mdns_example_main.c | 2 +- examples/protocols/mdns/sdkconfig.ci | 2 +- 6 files changed, 36 insertions(+), 36 deletions(-) diff --git a/examples/common_components/protocol_examples_common/Kconfig.projbuild b/examples/common_components/protocol_examples_common/Kconfig.projbuild index fe095582b..4a370b563 100644 --- a/examples/common_components/protocol_examples_common/Kconfig.projbuild +++ b/examples/common_components/protocol_examples_common/Kconfig.projbuild @@ -31,25 +31,25 @@ menu "Example Connection Configuration" Can be left blank if the network has no security set. - choice PHY_MODEL + choice EXAMPLE_PHY_MODEL prompt "Ethernet PHY" depends on EXAMPLE_CONNECT_ETHERNET - default CONFIG_PHY_TLK110 + default EXAMPLE_PHY_TLK110 help Select the PHY driver to use for the example. - config PHY_IP101 + config EXAMPLE_PHY_IP101 bool "IP101" help IP101 is a single port 10/100 MII/RMII/TP/Fiber Fast Ethernet Transceiver. Goto http://www.icplus.com.tw/pp-IP101G.html for more information about it. - config PHY_TLK110 + config EXAMPLE_PHY_TLK110 bool "TI TLK110 PHY" help Select this to use the TI TLK110 PHY - config PHY_LAN8720 + config EXAMPLE_PHY_LAN8720 bool "Microchip LAN8720 PHY" help Select this to use the Microchip LAN8720 PHY @@ -57,7 +57,7 @@ menu "Example Connection Configuration" endchoice - config PHY_ADDRESS + config EXAMPLE_PHY_ADDRESS int "PHY Address (0-31)" depends on EXAMPLE_CONNECT_ETHERNET default 31 @@ -68,32 +68,32 @@ menu "Example Connection Configuration" LAN8720 default 1 or 0 - choice PHY_CLOCK_MODE + choice EXAMPLE_PHY_CLOCK_MODE prompt "EMAC clock mode" depends on EXAMPLE_CONNECT_ETHERNET - default PHY_CLOCK_GPIO0_IN + default EXAMPLE_PHY_CLOCK_GPIO0_IN help Select external (input on GPIO0) or internal (output on GPIO16 or GPIO17) clock - config PHY_CLOCK_GPIO0_IN + config EXAMPLE_PHY_CLOCK_GPIO0_IN bool "GPIO0 input" depends on EXAMPLE_CONNECT_ETHERNET help Input of 50MHz PHY clock on GPIO0. - config PHY_CLOCK_GPIO0_OUT + config EXAMPLE_PHY_CLOCK_GPIO0_OUT bool "GPIO0 Output" help Output the internal 50MHz RMII clock on GPIO0. - config PHY_CLOCK_GPIO16_OUT + config EXAMPLE_PHY_CLOCK_GPIO16_OUT bool "GPIO16 output" depends on EXAMPLE_CONNECT_ETHERNET help Output the internal 50MHz APLL clock on GPIO16. - config PHY_CLOCK_GPIO17_OUT + config EXAMPLE_PHY_CLOCK_GPIO17_OUT bool "GPIO17 output (inverted)" depends on EXAMPLE_CONNECT_ETHERNET help @@ -101,16 +101,16 @@ menu "Example Connection Configuration" endchoice - config PHY_CLOCK_MODE + config EXAMPLE_PHY_CLOCK_MODE int depends on EXAMPLE_CONNECT_ETHERNET - default 0 if PHY_CLOCK_GPIO0_IN - default 1 if PHY_CLOCK_GPIO0_OUT - default 2 if PHY_CLOCK_GPIO16_OUT - default 3 if PHY_CLOCK_GPIO17_OUT + default 0 if EXAMPLE_PHY_CLOCK_GPIO0_IN + default 1 if EXAMPLE_PHY_CLOCK_GPIO0_OUT + default 2 if EXAMPLE_PHY_CLOCK_GPIO16_OUT + default 3 if EXAMPLE_PHY_CLOCK_GPIO17_OUT - config PHY_USE_POWER_PIN + config EXAMPLE_PHY_USE_POWER_PIN bool "Use PHY Power (enable/disable) pin" depends on EXAMPLE_CONNECT_ETHERNET default y @@ -118,16 +118,16 @@ menu "Example Connection Configuration" Use a GPIO "power pin" to power the PHY on/off during operation. Consult the example README for more details - config PHY_POWER_PIN + config EXAMPLE_PHY_POWER_PIN int "PHY Power GPIO" depends on EXAMPLE_CONNECT_ETHERNET default 17 range 0 33 - depends on PHY_USE_POWER_PIN + depends on EXAMPLE_PHY_USE_POWER_PIN help GPIO number to use for powering on/off the PHY. - config PHY_SMI_MDC_PIN + config EXAMPLE_PHY_SMI_MDC_PIN int "SMI MDC Pin" depends on EXAMPLE_CONNECT_ETHERNET default 23 @@ -135,7 +135,7 @@ menu "Example Connection Configuration" help GPIO number to use for SMI clock output MDC to PHY. - config PHY_SMI_MDIO_PIN + config EXAMPLE_PHY_SMI_MDIO_PIN int "SMI MDIO Pin" depends on EXAMPLE_CONNECT_ETHERNET default 18 diff --git a/examples/common_components/protocol_examples_common/connect.c b/examples/common_components/protocol_examples_common/connect.c index 37d9df6db..718d498f7 100644 --- a/examples/common_components/protocol_examples_common/connect.c +++ b/examples/common_components/protocol_examples_common/connect.c @@ -160,23 +160,23 @@ static void stop() #include "driver/gpio.h" -#ifdef CONFIG_PHY_LAN8720 +#ifdef CONFIG_EXAMPLE_PHY_LAN8720 #include "eth_phy/phy_lan8720.h" #define DEFAULT_ETHERNET_PHY_CONFIG phy_lan8720_default_ethernet_config #endif -#ifdef CONFIG_PHY_TLK110 +#ifdef CONFIG_EXAMPLE_PHY_TLK110 #include "eth_phy/phy_tlk110.h" #define DEFAULT_ETHERNET_PHY_CONFIG phy_tlk110_default_ethernet_config -#elif CONFIG_PHY_IP101 +#elif CONFIG_EXAMPLE_PHY_IP101 #include "eth_phy/phy_ip101.h" #define DEFAULT_ETHERNET_PHY_CONFIG phy_ip101_default_ethernet_config #endif -#define PIN_PHY_POWER CONFIG_PHY_POWER_PIN -#define PIN_SMI_MDC CONFIG_PHY_SMI_MDC_PIN -#define PIN_SMI_MDIO CONFIG_PHY_SMI_MDIO_PIN +#define PIN_PHY_POWER CONFIG_EXAMPLE_PHY_POWER_PIN +#define PIN_SMI_MDC CONFIG_EXAMPLE_PHY_SMI_MDC_PIN +#define PIN_SMI_MDIO CONFIG_EXAMPLE_PHY_SMI_MDIO_PIN -#ifdef CONFIG_PHY_USE_POWER_PIN +#ifdef CONFIG_EXAMPLE_PHY_USE_POWER_PIN /** * @brief re-define power enable func for phy * @@ -252,12 +252,12 @@ static void on_eth_event(void* arg, esp_event_base_t event_base, static void start() { eth_config_t config = DEFAULT_ETHERNET_PHY_CONFIG; - config.phy_addr = CONFIG_PHY_ADDRESS; + config.phy_addr = CONFIG_EXAMPLE_PHY_ADDRESS; config.gpio_config = eth_gpio_config_rmii; config.tcpip_input = tcpip_adapter_eth_input; - config.clock_mode = CONFIG_PHY_CLOCK_MODE; + config.clock_mode = CONFIG_EXAMPLE_PHY_CLOCK_MODE; -#ifdef CONFIG_PHY_USE_POWER_PIN +#ifdef CONFIG_EXAMPLE_PHY_USE_POWER_PIN /* Replace the default 'power enable' function with an example-specific one that toggles a power GPIO. */ config.phy_power_enable = phy_device_power_enable_via_gpio; diff --git a/examples/protocols/mdns/README.md b/examples/protocols/mdns/README.md index 182434e58..2c3516764 100644 --- a/examples/protocols/mdns/README.md +++ b/examples/protocols/mdns/README.md @@ -31,7 +31,7 @@ make -j4 flash monitor - You can now ping the device at `[board-hostname].local`, where `[board-hostname]` is preconfigured hostname, `esp32-mdns` by default. - You can also browse for `_http._tcp` on the same network to find the advertised service - Pressing the BOOT button will start querying the local network for the predefined in `check_button` hosts and services -- Note that for purpose of CI tests, configuration options of `RESOLVE_TEST_SERVICES` and `MDNS_ADD_MAC_TO_HOSTNAME` are available, but disabled by default. If enabled, then the hostname suffix of last 3 bytes from device MAC address is added, e.g. `esp32-mdns-80FFFF`, and a query for test service is issued. +- Note that for purpose of CI tests, configuration options of `MDNS_RESOLVE_TEST_SERVICES` and `MDNS_ADD_MAC_TO_HOSTNAME` are available, but disabled by default. If enabled, then the hostname suffix of last 3 bytes from device MAC address is added, e.g. `esp32-mdns-80FFFF`, and a query for test service is issued. (To exit the serial monitor, type ``Ctrl-]``.) diff --git a/examples/protocols/mdns/main/Kconfig.projbuild b/examples/protocols/mdns/main/Kconfig.projbuild index 7e7b22640..c4ae7e13b 100644 --- a/examples/protocols/mdns/main/Kconfig.projbuild +++ b/examples/protocols/mdns/main/Kconfig.projbuild @@ -12,7 +12,7 @@ menu "Example Configuration" help mDNS Instance Name for example to use - config RESOLVE_TEST_SERVICES + config MDNS_RESOLVE_TEST_SERVICES bool "Resolve test services" default n help diff --git a/examples/protocols/mdns/main/mdns_example_main.c b/examples/protocols/mdns/main/mdns_example_main.c index 1004475f3..11bee313b 100644 --- a/examples/protocols/mdns/main/mdns_example_main.c +++ b/examples/protocols/mdns/main/mdns_example_main.c @@ -165,7 +165,7 @@ static void check_button(void) static void mdns_example_task(void *pvParameters) { -#if CONFIG_RESOLVE_TEST_SERVICES == 1 +#if CONFIG_MDNS_RESOLVE_TEST_SERVICES == 1 /* Send initial queries that are started by CI tester */ query_mdns_host("tinytester"); #endif diff --git a/examples/protocols/mdns/sdkconfig.ci b/examples/protocols/mdns/sdkconfig.ci index 8d9206d0e..13b56273e 100644 --- a/examples/protocols/mdns/sdkconfig.ci +++ b/examples/protocols/mdns/sdkconfig.ci @@ -1,2 +1,2 @@ -CONFIG_RESOLVE_TEST_SERVICES=y +CONFIG_MDNS_RESOLVE_TEST_SERVICES=y CONFIG_MDNS_ADD_MAC_TO_HOSTNAME=y