Skip to content

Commit

Permalink
Take care of different signature of ETH.begin method in Arduino Core 3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
tbnobody committed Sep 27, 2024
1 parent b85e0ab commit 8b05bd2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/NetworkSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ void NetworkSettingsClass::init(Scheduler& scheduler)
_w5500 = std::make_unique<W5500>(pin.w5500_mosi, pin.w5500_miso, pin.w5500_sclk, pin.w5500_cs, pin.w5500_int, pin.w5500_rst);
} else if (PinMapping.isValidEthConfig()) {
PinMapping_t& pin = PinMapping.get();
#if ESP_ARDUINO_VERSION_MAJOR < 3
ETH.begin(pin.eth_phy_addr, pin.eth_power, pin.eth_mdc, pin.eth_mdio, pin.eth_type, pin.eth_clk_mode);
#else
ETH.begin(pin.eth_type, pin.eth_phy_addr, pin.eth_mdc, pin.eth_mdio, pin.eth_power, pin.eth_clk_mode);
#endif
}

setupMode();
Expand Down

0 comments on commit 8b05bd2

Please sign in to comment.