[ethernet] Skip the custom W5500 SPI driver for other ethernet types (#18533)

This commit is contained in:
J. Nick Koston
2026-08-20 09:59:30 -04:00
committed by GitHub
parent 3c47ab42d6
commit 8ef0f38f4e
+9
View File
@@ -811,6 +811,10 @@ _platform_filter = filter_source_files_from_platform(
PlatformFramework.ESP32_IDF,
PlatformFramework.ESP32_ARDUINO,
},
"w5500_custom_spi.cpp": {
PlatformFramework.ESP32_IDF,
PlatformFramework.ESP32_ARDUINO,
},
}
)
@@ -830,6 +834,11 @@ def _filter_source_files() -> list[str]:
# to avoid shadowing. Native IDF builds always need the custom driver.
if cv.Version(5, 4, 2) <= idf_version() < cv.Version(6, 0, 0):
excluded.append("esp_eth_phy_jl1101.c")
# The custom W5500 SPI driver is fully #ifdef'd on USE_ESP32 and
# USE_ETHERNET_W5500 (the platform filter map above handles non-ESP32);
# skip it entirely for the other ethernet types.
if eth_type != "W5500":
excluded.append("w5500_custom_spi.cpp")
return excluded