mirror of
https://github.com/esphome/esphome.git
synced 2026-08-22 22:26:21 +00:00
[ethernet] Skip the custom W5500 SPI driver for other ethernet types (#18533)
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user