Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Register Ethernet netif in WiFiGeneric to #7632

Merged
merged 2 commits into from
Feb 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions libraries/Ethernet/src/ETH.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#include "lwip/dns.h"

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

#if ESP_IDF_VERSION_MAJOR > 3

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

/* attach to WiFiGeneric to receive events */
add_esp_interface_netif(ESP_IF_ETH, eth_netif);

if(esp_eth_start(eth_handle) != ESP_OK){
log_e("esp_eth_start failed");
return false;
Expand Down