Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 024ba74

Browse files
s-hadingerme-no-dev
andauthored
Register Ethernet netif in WiFiGeneric to (#7632)
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
1 parent 211ba18 commit 024ba74

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

‎libraries/Ethernet/src/ETH.cpp‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
#include "lwip/dns.h"
4242

4343
extern void tcpipInit();
44+
extern void add_esp_interface_netif(esp_interface_t interface, esp_netif_t* esp_netif); /* from WiFiGeneric */
4445

4546
#if ESP_IDF_VERSION_MAJOR > 3
4647

@@ -327,6 +328,9 @@ bool ETHClass::begin(uint8_t phy_addr, int power, int mdc, int mdio, eth_phy_typ
327328
return false;
328329
}
329330

331+
/* attach to WiFiGeneric to receive events */
332+
add_esp_interface_netif(ESP_IF_ETH, eth_netif);
333+
330334
if(esp_eth_start(eth_handle) != ESP_OK){
331335
log_e("esp_eth_start failed");
332336
return false;

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /