diff --git a/esphome/components/libretiny/hal.cpp b/esphome/components/libretiny/hal.cpp index 4e94d5242b..e6dbb7296c 100644 --- a/esphome/components/libretiny/hal.cpp +++ b/esphome/components/libretiny/hal.cpp @@ -14,10 +14,9 @@ namespace esphome::libretiny {} // namespace esphome::libretiny namespace esphome { -// yield(), delay(), micros(), millis(), millis_64(), arch_feed_wdt(), -// arch_get_cpu_cycle_count(), arch_get_cpu_freq_hz() inlined in -// core/hal/hal_libretiny.h. -void IRAM_ATTR HOT delayMicroseconds(uint32_t us) { ::delayMicroseconds(us); } +// yield(), delay(), micros(), millis(), millis_64(), delayMicroseconds(), +// arch_feed_wdt(), arch_get_cpu_cycle_count(), arch_get_cpu_freq_hz() +// inlined in core/hal/hal_libretiny.h. void arch_init() { libretiny::setup_preferences(); diff --git a/esphome/core/hal/hal_libretiny.h b/esphome/core/hal/hal_libretiny.h index e519698ce0..db0fc11bfb 100644 --- a/esphome/core/hal/hal_libretiny.h +++ b/esphome/core/hal/hal_libretiny.h @@ -51,6 +51,7 @@ extern "C" void yield(void); extern "C" void delay(unsigned long ms); extern "C" unsigned long micros(void); extern "C" unsigned long millis(void); +extern "C" void delayMicroseconds(unsigned int us); // NOLINTEND(google-runtime-int,readability-identifier-naming,readability-redundant-declaration) // Forward decls from libretiny's family for the inline arch_* @@ -95,11 +96,12 @@ __attribute__((always_inline)) inline uint32_t millis() { return static_cast