Register Ethernet netif in WiFiGeneric to (#7632)
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
This commit is contained in:
parent
211ba18fa5
commit
024ba74068
1 changed files with 4 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue