Unverified Commit 024ba740 authored by s-hadinger's avatar s-hadinger Committed by GitHub

Register Ethernet `netif` in WiFiGeneric to (#7632)

Co-authored-by: default avatarMe No Dev <me-no-dev@users.noreply.github.com>
parent 211ba18f
......@@ -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
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment