Compare commits

...
2 Commits
Author SHA1 Message Date
Proddy ef11879dc0 Merge pull request #3226 from proddy/dev
don't use Eth if not on ESP32
2026-09-08 22:09:02 +02:00
proddy e3d9f03097 don't use Eth if not on ESP32 2026-09-08 22:08:22 +02:00
+3
View File
@@ -229,11 +229,14 @@ void Network::reconnect() {
// boards without an Ethernet PHY skip straight to WIFI; without a configured SSID, straight to AP // boards without an Ethernet PHY skip straight to WIFI; without a configured SSID, straight to AP
// (unless AP provision mode is Never — then stay on WIFI and keep waiting) // (unless AP provision mode is Never — then stay on WIFI and keep waiting)
NetPhase Network::initialPhase() const { NetPhase Network::initialPhase() const {
#if CONFIG_IDF_TARGET_ESP32
bool eth_clock_conflicts_psram = bool eth_clock_conflicts_psram =
ESP.getPsramSize() && ((eth_clock_mode_t)eth_clock_mode_ == ETH_CLOCK_GPIO16_OUT || (eth_clock_mode_t)eth_clock_mode_ == ETH_CLOCK_GPIO17_OUT); ESP.getPsramSize() && ((eth_clock_mode_t)eth_clock_mode_ == ETH_CLOCK_GPIO16_OUT || (eth_clock_mode_t)eth_clock_mode_ == ETH_CLOCK_GPIO17_OUT);
if (phy_type_ != PHY_type::PHY_TYPE_NONE && !eth_clock_conflicts_psram) { if (phy_type_ != PHY_type::PHY_TYPE_NONE && !eth_clock_conflicts_psram) {
return NetPhase::ETHERNET; return NetPhase::ETHERNET;
} }
#endif
if (!ssid_.isEmpty() || ap_provisionMode_ == AP_MODE_NEVER) { if (!ssid_.isEmpty() || ap_provisionMode_ == AP_MODE_NEVER) {
return NetPhase::WIFI; return NetPhase::WIFI;
} }