expected changes for arduino30 (#19421)

This commit is contained in:
Christian Baars 2023-08-30 14:17:21 +02:00 committed by GitHub
parent 39083b6add
commit 8e8e019e0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -215,7 +215,11 @@ void EthernetInit(void) {
// }
// delay(1);
//#endif // CONFIG_IDF_TARGET_ESP32
#if ESP_IDF_VERSION_MAJOR >= 5
if (!ETH.begin( (eth_phy_type_t)Settings->eth_type, Settings->eth_address, eth_mdc, eth_mdio, eth_power, (eth_clock_mode_t)Settings->eth_clk_mode)) {
#else
if (!ETH.begin(Settings->eth_address, eth_power, eth_mdc, eth_mdio, (eth_phy_type_t)Settings->eth_type, (eth_clock_mode_t)Settings->eth_clk_mode)) {
#endif
AddLog(LOG_LEVEL_DEBUG, PSTR(D_LOG_ETH "Bad PHY type or init error"));
return;
};