Rename Kconfig options (examples)

* Original commit: espressif/esp-idf@151f757912
This commit is contained in:
Roland Dobai
2019-05-09 16:43:06 +02:00
committed by suren-gabrielyan-espressif
parent 05ddd5f0e4
commit 9a0803ad7e
6 changed files with 36 additions and 36 deletions

View File

@ -31,25 +31,25 @@ menu "Example Connection Configuration"
Can be left blank if the network has no security set. Can be left blank if the network has no security set.
choice PHY_MODEL choice EXAMPLE_PHY_MODEL
prompt "Ethernet PHY" prompt "Ethernet PHY"
depends on EXAMPLE_CONNECT_ETHERNET depends on EXAMPLE_CONNECT_ETHERNET
default CONFIG_PHY_TLK110 default EXAMPLE_PHY_TLK110
help help
Select the PHY driver to use for the example. Select the PHY driver to use for the example.
config PHY_IP101 config EXAMPLE_PHY_IP101
bool "IP101" bool "IP101"
help help
IP101 is a single port 10/100 MII/RMII/TP/Fiber Fast Ethernet Transceiver. 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. 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" bool "TI TLK110 PHY"
help help
Select this to use the TI TLK110 PHY Select this to use the TI TLK110 PHY
config PHY_LAN8720 config EXAMPLE_PHY_LAN8720
bool "Microchip LAN8720 PHY" bool "Microchip LAN8720 PHY"
help help
Select this to use the Microchip LAN8720 PHY Select this to use the Microchip LAN8720 PHY
@ -57,7 +57,7 @@ menu "Example Connection Configuration"
endchoice endchoice
config PHY_ADDRESS config EXAMPLE_PHY_ADDRESS
int "PHY Address (0-31)" int "PHY Address (0-31)"
depends on EXAMPLE_CONNECT_ETHERNET depends on EXAMPLE_CONNECT_ETHERNET
default 31 default 31
@ -68,32 +68,32 @@ menu "Example Connection Configuration"
LAN8720 default 1 or 0 LAN8720 default 1 or 0
choice PHY_CLOCK_MODE choice EXAMPLE_PHY_CLOCK_MODE
prompt "EMAC clock mode" prompt "EMAC clock mode"
depends on EXAMPLE_CONNECT_ETHERNET depends on EXAMPLE_CONNECT_ETHERNET
default PHY_CLOCK_GPIO0_IN default EXAMPLE_PHY_CLOCK_GPIO0_IN
help help
Select external (input on GPIO0) or internal (output on GPIO16 or GPIO17) clock 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" bool "GPIO0 input"
depends on EXAMPLE_CONNECT_ETHERNET depends on EXAMPLE_CONNECT_ETHERNET
help help
Input of 50MHz PHY clock on GPIO0. Input of 50MHz PHY clock on GPIO0.
config PHY_CLOCK_GPIO0_OUT config EXAMPLE_PHY_CLOCK_GPIO0_OUT
bool "GPIO0 Output" bool "GPIO0 Output"
help help
Output the internal 50MHz RMII clock on GPIO0. Output the internal 50MHz RMII clock on GPIO0.
config PHY_CLOCK_GPIO16_OUT config EXAMPLE_PHY_CLOCK_GPIO16_OUT
bool "GPIO16 output" bool "GPIO16 output"
depends on EXAMPLE_CONNECT_ETHERNET depends on EXAMPLE_CONNECT_ETHERNET
help help
Output the internal 50MHz APLL clock on GPIO16. Output the internal 50MHz APLL clock on GPIO16.
config PHY_CLOCK_GPIO17_OUT config EXAMPLE_PHY_CLOCK_GPIO17_OUT
bool "GPIO17 output (inverted)" bool "GPIO17 output (inverted)"
depends on EXAMPLE_CONNECT_ETHERNET depends on EXAMPLE_CONNECT_ETHERNET
help help
@ -101,16 +101,16 @@ menu "Example Connection Configuration"
endchoice endchoice
config PHY_CLOCK_MODE config EXAMPLE_PHY_CLOCK_MODE
int int
depends on EXAMPLE_CONNECT_ETHERNET depends on EXAMPLE_CONNECT_ETHERNET
default 0 if PHY_CLOCK_GPIO0_IN default 0 if EXAMPLE_PHY_CLOCK_GPIO0_IN
default 1 if PHY_CLOCK_GPIO0_OUT default 1 if EXAMPLE_PHY_CLOCK_GPIO0_OUT
default 2 if PHY_CLOCK_GPIO16_OUT default 2 if EXAMPLE_PHY_CLOCK_GPIO16_OUT
default 3 if PHY_CLOCK_GPIO17_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" bool "Use PHY Power (enable/disable) pin"
depends on EXAMPLE_CONNECT_ETHERNET depends on EXAMPLE_CONNECT_ETHERNET
default y default y
@ -118,16 +118,16 @@ menu "Example Connection Configuration"
Use a GPIO "power pin" to power the PHY on/off during operation. Use a GPIO "power pin" to power the PHY on/off during operation.
Consult the example README for more details Consult the example README for more details
config PHY_POWER_PIN config EXAMPLE_PHY_POWER_PIN
int "PHY Power GPIO" int "PHY Power GPIO"
depends on EXAMPLE_CONNECT_ETHERNET depends on EXAMPLE_CONNECT_ETHERNET
default 17 default 17
range 0 33 range 0 33
depends on PHY_USE_POWER_PIN depends on EXAMPLE_PHY_USE_POWER_PIN
help help
GPIO number to use for powering on/off the PHY. 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" int "SMI MDC Pin"
depends on EXAMPLE_CONNECT_ETHERNET depends on EXAMPLE_CONNECT_ETHERNET
default 23 default 23
@ -135,7 +135,7 @@ menu "Example Connection Configuration"
help help
GPIO number to use for SMI clock output MDC to PHY. 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" int "SMI MDIO Pin"
depends on EXAMPLE_CONNECT_ETHERNET depends on EXAMPLE_CONNECT_ETHERNET
default 18 default 18

View File

@ -160,23 +160,23 @@ static void stop()
#include "driver/gpio.h" #include "driver/gpio.h"
#ifdef CONFIG_PHY_LAN8720 #ifdef CONFIG_EXAMPLE_PHY_LAN8720
#include "eth_phy/phy_lan8720.h" #include "eth_phy/phy_lan8720.h"
#define DEFAULT_ETHERNET_PHY_CONFIG phy_lan8720_default_ethernet_config #define DEFAULT_ETHERNET_PHY_CONFIG phy_lan8720_default_ethernet_config
#endif #endif
#ifdef CONFIG_PHY_TLK110 #ifdef CONFIG_EXAMPLE_PHY_TLK110
#include "eth_phy/phy_tlk110.h" #include "eth_phy/phy_tlk110.h"
#define DEFAULT_ETHERNET_PHY_CONFIG phy_tlk110_default_ethernet_config #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" #include "eth_phy/phy_ip101.h"
#define DEFAULT_ETHERNET_PHY_CONFIG phy_ip101_default_ethernet_config #define DEFAULT_ETHERNET_PHY_CONFIG phy_ip101_default_ethernet_config
#endif #endif
#define PIN_PHY_POWER CONFIG_PHY_POWER_PIN #define PIN_PHY_POWER CONFIG_EXAMPLE_PHY_POWER_PIN
#define PIN_SMI_MDC CONFIG_PHY_SMI_MDC_PIN #define PIN_SMI_MDC CONFIG_EXAMPLE_PHY_SMI_MDC_PIN
#define PIN_SMI_MDIO CONFIG_PHY_SMI_MDIO_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 * @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() static void start()
{ {
eth_config_t config = DEFAULT_ETHERNET_PHY_CONFIG; 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.gpio_config = eth_gpio_config_rmii;
config.tcpip_input = tcpip_adapter_eth_input; 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 /* Replace the default 'power enable' function with an example-specific one
that toggles a power GPIO. */ that toggles a power GPIO. */
config.phy_power_enable = phy_device_power_enable_via_gpio; config.phy_power_enable = phy_device_power_enable_via_gpio;

View File

@ -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 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 - 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 - 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-]``.) (To exit the serial monitor, type ``Ctrl-]``.)

View File

@ -12,7 +12,7 @@ menu "Example Configuration"
help help
mDNS Instance Name for example to use mDNS Instance Name for example to use
config RESOLVE_TEST_SERVICES config MDNS_RESOLVE_TEST_SERVICES
bool "Resolve test services" bool "Resolve test services"
default n default n
help help

View File

@ -165,7 +165,7 @@ static void check_button(void)
static void mdns_example_task(void *pvParameters) 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 */ /* Send initial queries that are started by CI tester */
query_mdns_host("tinytester"); query_mdns_host("tinytester");
#endif #endif

View File

@ -1,2 +1,2 @@
CONFIG_RESOLVE_TEST_SERVICES=y CONFIG_MDNS_RESOLVE_TEST_SERVICES=y
CONFIG_MDNS_ADD_MAC_TO_HOSTNAME=y CONFIG_MDNS_ADD_MAC_TO_HOSTNAME=y