From b95a14a7272f9a77c12fe628c57d1bc71b5e6847 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20=C3=82ngelo=20Russi?= Date: Mon, 22 Nov 2021 09:29:15 -0300 Subject: [PATCH 1/3] using ksz8081 only from ESP-IDF 4.4 onwards The previous assertion only considerate the existance of ESP-IDF 4.3, but with the ESP-IDF 4.3.1 release this assertion would generate errors. Now only includes from ESP-IDF 4.4 onwards. --- libraries/Ethernet/src/ETH.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/Ethernet/src/ETH.cpp b/libraries/Ethernet/src/ETH.cpp index 33e86691b1d..3dd1dfc6e7a 100644 --- a/libraries/Ethernet/src/ETH.cpp +++ b/libraries/Ethernet/src/ETH.cpp @@ -282,7 +282,7 @@ bool ETHClass::begin(uint8_t phy_addr, int power, int mdc, int mdio, eth_phy_typ break; #endif case ETH_PHY_KSZ8081: -#if ESP_IDF_VERSION > ESP_IDF_VERSION_VAL(4,3,0) +#if ESP_IDF_VERSION_MAJOR >= 4 && ESP_IDF_VERSION_MINOR >= 4 eth_phy = esp_eth_phy_new_ksz8081(&phy_config); #else log_e("unsupported ethernet type 'ETH_PHY_KSZ8081'"); From 4477694390402e20cb00d638bd0907a72cfccd23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20=C3=82ngelo=20Russi?= Date: Mon, 22 Nov 2021 14:29:01 -0300 Subject: [PATCH 2/3] Changes made as instructed --- libraries/Ethernet/src/ETH.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/Ethernet/src/ETH.cpp b/libraries/Ethernet/src/ETH.cpp index 3dd1dfc6e7a..373fd88fdd7 100644 --- a/libraries/Ethernet/src/ETH.cpp +++ b/libraries/Ethernet/src/ETH.cpp @@ -282,7 +282,7 @@ bool ETHClass::begin(uint8_t phy_addr, int power, int mdc, int mdio, eth_phy_typ break; #endif case ETH_PHY_KSZ8081: -#if ESP_IDF_VERSION_MAJOR >= 4 && ESP_IDF_VERSION_MINOR >= 4 +#if ESP_IDF_VERSION => ESP_IDF_VERSION_VAL(4,4,0) eth_phy = esp_eth_phy_new_ksz8081(&phy_config); #else log_e("unsupported ethernet type 'ETH_PHY_KSZ8081'"); From 18e60bf1981bf99a65f3ccf219ac5915f569a9d5 Mon Sep 17 00:00:00 2001 From: Me No Dev Date: Tue, 14 Dec 2021 15:55:48 +0200 Subject: [PATCH 3/3] Fix more or equal check --- libraries/Ethernet/src/ETH.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/Ethernet/src/ETH.cpp b/libraries/Ethernet/src/ETH.cpp index 373fd88fdd7..851eb846170 100644 --- a/libraries/Ethernet/src/ETH.cpp +++ b/libraries/Ethernet/src/ETH.cpp @@ -282,7 +282,7 @@ bool ETHClass::begin(uint8_t phy_addr, int power, int mdc, int mdio, eth_phy_typ break; #endif case ETH_PHY_KSZ8081: -#if ESP_IDF_VERSION => ESP_IDF_VERSION_VAL(4,4,0) +#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4,4,0) eth_phy = esp_eth_phy_new_ksz8081(&phy_config); #else log_e("unsupported ethernet type 'ETH_PHY_KSZ8081'");