From b7960ee19b255abad8dbb6353fe1addb17553f9b Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 15 Mar 2026 17:57:52 -1000 Subject: [PATCH] [ethernet] Keep CONFIG_ETH_SPI_ETHERNET_* in defines.h for static analysis On IDF 5.x, the ESP-IDF headers use CONFIG_ETH_SPI_ETHERNET_W5500 and CONFIG_ETH_SPI_ETHERNET_DM9051 to conditionally expose the W5500/DM9051 types. Static analysis (clang-tidy) needs both the new USE_ETHERNET_* defines and the old CONFIG_* defines to resolve all symbols. --- esphome/core/defines.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/esphome/core/defines.h b/esphome/core/defines.h index e3d443dda4b..513c70e17ec 100644 --- a/esphome/core/defines.h +++ b/esphome/core/defines.h @@ -283,6 +283,8 @@ #define USE_ETHERNET_OPENETH #define USE_ETHERNET_W5500 #define USE_ETHERNET_DM9051 +#define CONFIG_ETH_SPI_ETHERNET_W5500 1 +#define CONFIG_ETH_SPI_ETHERNET_DM9051 1 #define CONFIG_ETH_USE_ESP32_EMAC 1 #define USE_ETHERNET_MANUAL_IP #define USE_ETHERNET_IP_STATE_LISTENERS