Skip to content

Commit

Permalink
[ESP_IDF 5.1] Fix build on ESP32 ETH builds
Browse files Browse the repository at this point in the history
  • Loading branch information
TD-er committed Oct 6, 2023
1 parent aa150eb commit 8e0e502
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/src/ESPEasyCore/ESPEasyEth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,24 @@ bool ETHConnectRelaxed() {

if (!EthEventData.ethInitSuccess) {
ethResetGPIOpins();
#if ESP_IDF_VERSION_MAJOR < 5
EthEventData.ethInitSuccess = ETH.begin(
Settings.ETH_Phy_Addr,
Settings.ETH_Pin_power,
Settings.ETH_Pin_mdc,
Settings.ETH_Pin_mdio,
(eth_phy_type_t)Settings.ETH_Phy_Type,
(eth_clock_mode_t)Settings.ETH_Clock_Mode);
#else
EthEventData.ethInitSuccess = ETH.begin(
(eth_phy_type_t)Settings.ETH_Phy_Type,
Settings.ETH_Phy_Addr,
Settings.ETH_Pin_mdc,
Settings.ETH_Pin_mdio,
Settings.ETH_Pin_power,
(eth_clock_mode_t)Settings.ETH_Clock_Mode);

#endif
}
if (EthEventData.ethInitSuccess) {
// FIXME TD-er: Not sure if this is correctly set to false
Expand Down

0 comments on commit 8e0e502

Please sign in to comment.