From 09542430f492365f1ac6bd5ed4b872984cb70cd8 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 29 Apr 2026 15:37:47 -0500 Subject: [PATCH] [esp8266] Address Copilot review on #16112 - hal.cpp: include esphome/core/helpers.h for the HOT macro (millis/delay use it; without the include the TU fails to compile). - hal_esp8266.h: drop the redundant arch_get_cpu_cycle_count() bare declaration that came back via the merge from dev (the inline def above already declares the function). --- esphome/components/esp8266/hal.cpp | 1 + esphome/core/hal/hal_esp8266.h | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/esphome/components/esp8266/hal.cpp b/esphome/components/esp8266/hal.cpp index ef93a95273..56910e5b39 100644 --- a/esphome/components/esp8266/hal.cpp +++ b/esphome/components/esp8266/hal.cpp @@ -1,6 +1,7 @@ #ifdef USE_ESP8266 #include "esphome/core/hal.h" +#include "esphome/core/helpers.h" #include #include diff --git a/esphome/core/hal/hal_esp8266.h b/esphome/core/hal/hal_esp8266.h index 976b697686..b6e3b1ee3c 100644 --- a/esphome/core/hal/hal_esp8266.h +++ b/esphome/core/hal/hal_esp8266.h @@ -66,8 +66,6 @@ __attribute__((always_inline)) inline void arch_init() {} __attribute__((always_inline)) inline uint32_t arch_get_cpu_cycle_count() { return esp_get_cycle_count(); } __attribute__((always_inline)) inline uint32_t arch_get_cpu_freq_hz() { return F_CPU; } -uint32_t arch_get_cpu_cycle_count(); - } // namespace esphome #endif // USE_ESP8266