未验证 提交 024ba740 编写于 作者: S s-hadinger 提交者: GitHub

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

Co-authored-by: NMe No Dev <me-no-dev@users.noreply.github.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册