Skip to content

Commit 680bad6

Browse files
add esp_eth component
* Original commit: espressif/esp-idf@90c4827
1 parent 271665e commit 680bad6

File tree

3 files changed

+61
-213
lines changed

3 files changed

+61
-213
lines changed

components/mdns/mdns.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3049,13 +3049,13 @@ void _mdns_disable_pcb(tcpip_adapter_if_t tcpip_if, mdns_ip_protocol_t ip_protoc
30493049
/**
30503050
* @brief Dispatch interface changes based on system events
30513051
*/
3052-
static void _mdns_handle_system_event(esp_event_base_t event_base,
3052+
static void _mdns_handle_system_event(esp_event_base_t event_base,
30533053
int32_t event_id, tcpip_adapter_if_t interface)
30543054
{
30553055
if (!_mdns_server) {
30563056
return;
30573057
}
3058-
3058+
30593059
tcpip_adapter_dhcp_status_t dcst;
30603060
if (event_base == WIFI_EVENT) {
30613061
switch(event_id) {
@@ -3723,7 +3723,7 @@ static void _mdns_execute_action(mdns_action_t * action)
37233723

37243724
switch(action->type) {
37253725
case ACTION_SYSTEM_EVENT:
3726-
_mdns_handle_system_event(action->data.sys_event.event_base,
3726+
_mdns_handle_system_event(action->data.sys_event.event_base,
37273727
action->data.sys_event.event_id, action->data.sys_event.interface);
37283728
break;
37293729
case ACTION_HOSTNAME_SET:
@@ -4120,7 +4120,7 @@ esp_err_t mdns_handle_system_event(void *ctx, system_event_t *event)
41204120
return ESP_OK;
41214121
}
41224122

4123-
static void event_handler(void* arg, esp_event_base_t event_base,
4123+
static void event_handler(void* arg, esp_event_base_t event_base,
41244124
int32_t event_id, void* event_data)
41254125
{
41264126
if (!_mdns_server) {
@@ -4142,7 +4142,7 @@ static void event_handler(void* arg, esp_event_base_t event_base,
41424142

41434143
if (xQueueSend(_mdns_server->action_queue, &action, (portTickType)0) != pdPASS) {
41444144
free(action);
4145-
}
4145+
}
41464146
}
41474147

41484148
esp_err_t mdns_init()

examples/common_components/protocol_examples_common/Kconfig.projbuild

Lines changed: 16 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -30,119 +30,39 @@ menu "Example Connection Configuration"
3030
WiFi password (WPA or WPA2) for the example to use.
3131
Can be left blank if the network has no security set.
3232

33-
34-
choice EXAMPLE_PHY_MODEL
35-
prompt "Ethernet PHY"
33+
choice EXAMPLE_ETH_PHY_MODEL
3634
depends on EXAMPLE_CONNECT_ETHERNET
37-
default EXAMPLE_PHY_TLK110
35+
prompt "Ethernet PHY Device"
36+
default EXAMPLE_ETH_PHY_IP101
3837
help
3938
Select the PHY driver to use for the example.
4039

41-
config EXAMPLE_PHY_IP101
40+
config EXAMPLE_ETH_PHY_IP101
4241
bool "IP101"
4342
help
4443
IP101 is a single port 10/100 MII/RMII/TP/Fiber Fast Ethernet Transceiver.
4544
Goto http://www.icplus.com.tw/pp-IP101G.html for more information about it.
4645

47-
config EXAMPLE_PHY_TLK110
48-
bool "TI TLK110 PHY"
49-
help
50-
Select this to use the TI TLK110 PHY
51-
52-
config EXAMPLE_PHY_LAN8720
53-
bool "Microchip LAN8720 PHY"
54-
help
55-
Select this to use the Microchip LAN8720 PHY
56-
57-
endchoice
58-
59-
60-
config EXAMPLE_PHY_ADDRESS
61-
int "PHY Address (0-31)"
62-
depends on EXAMPLE_CONNECT_ETHERNET
63-
default 31
64-
range 0 31
65-
help
66-
Select the PHY Address (0-31) for the hardware configuration and PHY model.
67-
TLK110 default 31
68-
LAN8720 default 1 or 0
69-
70-
71-
choice EXAMPLE_PHY_CLOCK_MODE
72-
prompt "EMAC clock mode"
73-
depends on EXAMPLE_CONNECT_ETHERNET
74-
default EXAMPLE_PHY_CLOCK_GPIO0_IN
75-
help
76-
Select external (input on GPIO0) or internal (output on GPIO16 or GPIO17) clock
77-
78-
79-
config EXAMPLE_PHY_CLOCK_GPIO0_IN
80-
bool "GPIO0 input"
81-
depends on EXAMPLE_CONNECT_ETHERNET
82-
help
83-
Input of 50MHz PHY clock on GPIO0.
84-
85-
config EXAMPLE_PHY_CLOCK_GPIO0_OUT
86-
bool "GPIO0 Output"
46+
config EXAMPLE_ETH_PHY_RTL8201
47+
bool "RTL8201/SR8201"
8748
help
88-
Output the internal 50MHz RMII clock on GPIO0.
49+
RTL8201F/SR8201F is a single port 10/100Mb Ethernet Transceiver with auto MDIX.
50+
Goto http://www.corechip-sz.com/productsview.asp?id=22 for more information about it.
8951

90-
config EXAMPLE_PHY_CLOCK_GPIO16_OUT
91-
bool "GPIO16 output"
92-
depends on EXAMPLE_CONNECT_ETHERNET
52+
config EXAMPLE_ETH_PHY_LAN8720
53+
bool "LAN8720"
9354
help
94-
Output the internal 50MHz APLL clock on GPIO16.
55+
LAN8720A is a small footprint RMII 10/100 Ethernet Transceiver with HP Auto-MDIX Support.
56+
Goto https://www.microchip.com/LAN8720A for more information about it.
9557

96-
config EXAMPLE_PHY_CLOCK_GPIO17_OUT
97-
bool "GPIO17 output (inverted)"
98-
depends on EXAMPLE_CONNECT_ETHERNET
58+
config EXAMPLE_ETH_PHY_DP83848
59+
bool "DP83848"
9960
help
100-
Output the internal 50MHz APLL clock on GPIO17 (inverted signal).
61+
DP83848 is a single port 10/100Mb/s Ethernet Physical Layer Transceiver.
62+
Goto http://www.ti.com/product/DP83848J for more information about it.
10163

10264
endchoice
10365

104-
config EXAMPLE_PHY_CLOCK_MODE
105-
int
106-
depends on EXAMPLE_CONNECT_ETHERNET
107-
default 0 if EXAMPLE_PHY_CLOCK_GPIO0_IN
108-
default 1 if EXAMPLE_PHY_CLOCK_GPIO0_OUT
109-
default 2 if EXAMPLE_PHY_CLOCK_GPIO16_OUT
110-
default 3 if EXAMPLE_PHY_CLOCK_GPIO17_OUT
111-
112-
113-
config EXAMPLE_PHY_USE_POWER_PIN
114-
bool "Use PHY Power (enable/disable) pin"
115-
depends on EXAMPLE_CONNECT_ETHERNET
116-
default y
117-
help
118-
Use a GPIO "power pin" to power the PHY on/off during operation.
119-
Consult the example README for more details
120-
121-
config EXAMPLE_PHY_POWER_PIN
122-
int "PHY Power GPIO"
123-
depends on EXAMPLE_CONNECT_ETHERNET
124-
default 17
125-
range 0 33
126-
depends on EXAMPLE_PHY_USE_POWER_PIN
127-
help
128-
GPIO number to use for powering on/off the PHY.
129-
130-
config EXAMPLE_PHY_SMI_MDC_PIN
131-
int "SMI MDC Pin"
132-
depends on EXAMPLE_CONNECT_ETHERNET
133-
default 23
134-
range 0 33
135-
help
136-
GPIO number to use for SMI clock output MDC to PHY.
137-
138-
config EXAMPLE_PHY_SMI_MDIO_PIN
139-
int "SMI MDIO Pin"
140-
depends on EXAMPLE_CONNECT_ETHERNET
141-
default 18
142-
range 0 33
143-
help
144-
GPIO number to use for SMI data pin MDIO to/from PHY.
145-
14666
config EXAMPLE_CONNECT_IPV6
14767
bool "Obtain IPv6 link-local address"
14868
default y

0 commit comments

Comments
 (0)