From 886bfe26e8477debc904151f87f62dcf715e731f Mon Sep 17 00:00:00 2001 From: Alexey Yukhin <83004070+AlexeyYukhin@users.noreply.github.com> Date: Thu, 9 Sep 2021 10:26:19 +0200 Subject: [PATCH 1/2] arduino component's build proccess fixed for esp-idf project using --- cores/esp32/IPAddress.h | 2 +- libraries/WiFi/src/ETH.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cores/esp32/IPAddress.h b/cores/esp32/IPAddress.h index aa1d10cee29..80a4e490d7e 100644 --- a/cores/esp32/IPAddress.h +++ b/cores/esp32/IPAddress.h @@ -91,6 +91,6 @@ class IPAddress: public Printable friend class DNSClient; }; -const IPAddress INADDR_NONE(0, 0, 0, 0); +// const IPAddress INADDR_NONE(0, 0, 0, 0); #endif diff --git a/libraries/WiFi/src/ETH.cpp b/libraries/WiFi/src/ETH.cpp index 092d6a3d467..8d051d425b0 100644 --- a/libraries/WiFi/src/ETH.cpp +++ b/libraries/WiFi/src/ETH.cpp @@ -287,8 +287,12 @@ bool ETHClass::begin(uint8_t phy_addr, int power, int mdc, int mdio, eth_phy_typ eth_phy = esp_eth_phy_new_dm9051(&phy_config); break; #endif + +#if ESP_IDF_VERSION_MAJOR > 4 && ESP_IDF_VERSION_MINOR > 3 case ETH_PHY_KSZ8081: eth_phy = esp_eth_phy_new_ksz8081(&phy_config); + break; +#endif default: break; } From 7e1f16c0e8869e8e32a20075818ee1c39f65ae92 Mon Sep 17 00:00:00 2001 From: Alexey Yukhin <83004070+AlexeyYukhin@users.noreply.github.com> Date: Thu, 9 Sep 2021 10:49:10 +0200 Subject: [PATCH 2/2] #if condition improved --- libraries/WiFi/src/ETH.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/WiFi/src/ETH.cpp b/libraries/WiFi/src/ETH.cpp index 8d051d425b0..ed6eabf8f5f 100644 --- a/libraries/WiFi/src/ETH.cpp +++ b/libraries/WiFi/src/ETH.cpp @@ -288,7 +288,7 @@ bool ETHClass::begin(uint8_t phy_addr, int power, int mdc, int mdio, eth_phy_typ break; #endif -#if ESP_IDF_VERSION_MAJOR > 4 && ESP_IDF_VERSION_MINOR > 3 +#if ((ESP_IDF_VERSION_MAJOR >= 4) && (ESP_IDF_VERSION_MINOR > 3)) case ETH_PHY_KSZ8081: eth_phy = esp_eth_phy_new_ksz8081(&phy_config); break;