From 74cbc47614f7fd5d0b6287ad480a76322803bd64 Mon Sep 17 00:00:00 2001 From: Stephan Hadinger Date: Wed, 31 Aug 2022 10:12:25 +0200 Subject: [PATCH] Be more specific to target ESP32 --- tasmota/tasmota_xdrv_driver/xdrv_82_esp32_ethernet.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasmota/tasmota_xdrv_driver/xdrv_82_esp32_ethernet.ino b/tasmota/tasmota_xdrv_driver/xdrv_82_esp32_ethernet.ino index 264cd8f3c..525e878cc 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_82_esp32_ethernet.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_82_esp32_ethernet.ino @@ -154,7 +154,7 @@ void EthernetInit(void) { int eth_power = Pin(GPIO_ETH_PHY_POWER); int eth_mdc = Pin(GPIO_ETH_PHY_MDC); int eth_mdio = Pin(GPIO_ETH_PHY_MDIO); -#ifdef ESP32 +#if CONFIG_IDF_TARGET_ESP32 // fix an disconnection issue after rebooting Olimex POE - this forces a clean state for all GPIO involved in RMII gpio_reset_pin((gpio_num_t)GPIO_ETH_PHY_POWER); gpio_reset_pin((gpio_num_t)GPIO_ETH_PHY_MDC); @@ -178,7 +178,7 @@ void EthernetInit(void) { break; } delay(1); -#endif +#endif // CONFIG_IDF_TARGET_ESP32 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)) { AddLog(LOG_LEVEL_DEBUG, PSTR("ETH: Bad PHY type or init error")); return;