From 9dc28556d7999f5f029608af1eb627fe5bc03da8 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 29 Apr 2026 07:24:24 -0500 Subject: [PATCH] [esp8266] Add bare arch_get_cpu_cycle_count() decl in hal_esp8266.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup #16111 dropped the cross-platform arch_get_cpu_cycle_count() declaration from hal.h dispatcher and added bare decls to libretiny, rp2040, host, and zephyr per-platform headers — but missed hal_esp8266.h. ESP8266 callers (spi.h, uart_component_esp8266.cpp) now fail clang-tidy with 'use of undeclared identifier'. The body is still out-of-line in components/esp8266/core.cpp on this PR; the inline def is added on the chained #16112 PR. Add a bare decl here for now so #16111 builds in isolation. --- esphome/core/hal/hal_esp8266.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/esphome/core/hal/hal_esp8266.h b/esphome/core/hal/hal_esp8266.h index 04326a3579..484118f1f5 100644 --- a/esphome/core/hal/hal_esp8266.h +++ b/esphome/core/hal/hal_esp8266.h @@ -60,6 +60,8 @@ __attribute__((always_inline)) inline uint16_t progmem_read_uint16(const uint16_ __attribute__((always_inline)) inline void delayMicroseconds(uint32_t us) { delay_microseconds_safe(us); } __attribute__((always_inline)) inline void arch_feed_wdt() { system_soft_wdt_feed(); } +uint32_t arch_get_cpu_cycle_count(); + } // namespace esphome #endif // USE_ESP8266