mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-06 11:39:32 +00:00
check ETH.begin() result
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
72aefbc567
commit
5ef83675a3
@ -74,13 +74,21 @@ bool initEthernet()
|
|||||||
if (config.network.eth_enabled) {
|
if (config.network.eth_enabled) {
|
||||||
WiFi.onEvent(WiFiEvent);
|
WiFi.onEvent(WiFiEvent);
|
||||||
#if defined(USE_WS5500)
|
#if defined(USE_WS5500)
|
||||||
ETH.begin(ETH_PHY_W5500, 1, ETH_CS_PIN, ETH_INT_PIN, ETH_RST_PIN, SPI3_HOST,
|
if (!ETH.begin(ETH_PHY_W5500, 1, ETH_CS_PIN, ETH_INT_PIN, ETH_RST_PIN, SPI3_HOST,
|
||||||
ETH_SCLK_PIN, ETH_MISO_PIN, ETH_MOSI_PIN);
|
ETH_SCLK_PIN, ETH_MISO_PIN, ETH_MOSI_PIN)) {
|
||||||
|
LOG_ERROR("ETH.begin() failed for WS5500");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
#if defined(USE_ESP32_RMIIPHY)
|
#if defined(USE_ESP32_RMIIPHY)
|
||||||
ETH.begin(ESP32_RMIIPHY_ADDR, ESP32_RMIIPHY_PWR,
|
ETH.begin(ESP32_RMIIPHY_ADDR, ESP32_RMIIPHY_PWR,
|
||||||
ESP32_RMIIPHY_MDC, ESP32_RMIIPHY_MDIO,
|
ESP32_RMIIPHY_MDC, ESP32_RMIIPHY_MDIO,
|
||||||
ESP32_RMIIPHY_TYPE, ESP32_RMIIPHY_CLKTYPE);
|
if (!ETH.begin(ESP32_RMIIPHY_ADDR, ESP32_RMIIPHY_PWR,
|
||||||
|
ESP32_RMIIPHY_MDC, ESP32_RMIIPHY_MDIO,
|
||||||
|
ESP32_RMIIPHY_TYPE, ESP32_RMIIPHY_CLKTYPE)) {
|
||||||
|
LOG_ERROR("ETH.begin() failed for ESP32 RMII PHY");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !MESHTASTIC_EXCLUDE_WEBSERVER
|
#if !MESHTASTIC_EXCLUDE_WEBSERVER
|
||||||
|
Loading…
Reference in New Issue
Block a user