@@ -233,7 +233,7 @@ bool ETHClass::begin(uint8_t phy_addr, int power, int mdc, int mdio, eth_phy_typ
233
233
tcpipInit ();
234
234
235
235
tcpip_adapter_set_default_eth_handlers ();
236
-
236
+
237
237
esp_netif_config_t cfg = ESP_NETIF_DEFAULT_ETH ();
238
238
esp_netif_t *eth_netif = esp_netif_new (&cfg);
239
239
@@ -245,12 +245,8 @@ bool ETHClass::begin(uint8_t phy_addr, int power, int mdc, int mdio, eth_phy_typ
245
245
#endif
246
246
#if CONFIG_ETH_USE_ESP32_EMAC
247
247
eth_mac_config_t mac_config = ETH_MAC_DEFAULT_CONFIG ();
248
-
249
- // Theo - core 2.0.2.3 start of fix 1 of 2
250
248
mac_config.clock_config .rmii .clock_mode = (eth_clock_mode) ? EMAC_CLK_OUT : EMAC_CLK_EXT_IN;
251
249
mac_config.clock_config .rmii .clock_gpio = (1 == eth_clock_mode) ? EMAC_APPL_CLK_OUT_GPIO : (2 == eth_clock_mode) ? EMAC_CLK_OUT_GPIO : (3 == eth_clock_mode) ? EMAC_CLK_OUT_180_GPIO : EMAC_CLK_IN_GPIO;
252
- // Theo - core 2.0.2.3 end of fix 1 of 2
253
-
254
250
mac_config.smi_mdc_gpio_num = mdc;
255
251
mac_config.smi_mdio_gpio_num = mdio;
256
252
mac_config.sw_reset_timeout_ms = 1000 ;
@@ -311,17 +307,13 @@ bool ETHClass::begin(uint8_t phy_addr, int power, int mdc, int mdio, eth_phy_typ
311
307
312
308
eth_handle = NULL ;
313
309
esp_eth_config_t eth_config = ETH_DEFAULT_CONFIG (eth_mac, eth_phy);
314
-
315
- // Theo - core 2.0.2.3 start of fix 2 of 2
316
- // eth_config.on_lowlevel_init_done = on_lowlevel_init_done;
317
- // Theo - core 2.0.2.3 end of fix 2 of 2
318
-
310
+ // eth_config.on_lowlevel_init_done = on_lowlevel_init_done;
319
311
// eth_config.on_lowlevel_deinit_done = on_lowlevel_deinit_done;
320
312
if (esp_eth_driver_install (ð_config, ð_handle) != ESP_OK || eth_handle == NULL ){
321
313
log_e (" esp_eth_driver_install failed" );
322
314
return false ;
323
315
}
324
-
316
+
325
317
/* attach Ethernet driver to TCP/IP stack */
326
318
if (esp_netif_attach (eth_netif, esp_eth_new_netif_glue (eth_handle)) != ESP_OK){
327
319
log_e (" esp_netif_attach failed" );
@@ -418,7 +410,7 @@ bool ETHClass::config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, I
418
410
log_e (" STA IP could not be configured! Error: %d" , err);
419
411
return false ;
420
412
}
421
-
413
+
422
414
if (info.ip .addr ){
423
415
staticIP = true ;
424
416
} else {
0 commit comments