From 2a678d220dc10a539d795e0ca2294b3cb67f982f Mon Sep 17 00:00:00 2001 From: Staars Date: Tue, 29 Aug 2023 21:33:07 +0200 Subject: [PATCH] expected changes for arduino30 --- tasmota/tasmota_xdrv_driver/xdrv_82_esp32_ethernet.ino | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tasmota/tasmota_xdrv_driver/xdrv_82_esp32_ethernet.ino b/tasmota/tasmota_xdrv_driver/xdrv_82_esp32_ethernet.ino index 0ce6b3789ad5..f484566fa420 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_82_esp32_ethernet.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_82_esp32_ethernet.ino @@ -215,7 +215,11 @@ void EthernetInit(void) { // } // delay(1); //#endif // CONFIG_IDF_TARGET_ESP32 +#if ESP_IDF_VERSION_MAJOR >= 5 + if (!ETH.begin( (eth_phy_type_t)Settings->eth_type, Settings->eth_address, eth_mdc, eth_mdio, eth_power, (eth_clock_mode_t)Settings->eth_clk_mode)) { +#else if (!ETH.begin(Settings->eth_address, eth_power, eth_mdc, eth_mdio, (eth_phy_type_t)Settings->eth_type, (eth_clock_mode_t)Settings->eth_clk_mode)) { +#endif AddLog(LOG_LEVEL_DEBUG, PSTR(D_LOG_ETH "Bad PHY type or init error")); return; };