using ksz8081 only from ESP-IDF 4.4 onwards (#5918)

* 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.

Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
This commit is contained in:
Vítor Ângelo Russi
2021-12-14 11:09:01 -03:00
committed by GitHub
parent 2463f57246
commit 4b638de19d

View File

@ -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 >= 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'");