mirror of
https://github.com/esphome/esphome.git
synced 2026-09-19 11:08:38 +00:00
0f128d2f15ed9a1f0f1f2970a421fa0c9b5e47f1
These wrappers were one-line forwarders to platform primitives: delayMicroseconds(us) -> delay_microseconds_safe(us) arch_feed_wdt() -> system_soft_wdt_feed() progmem_read_byte(p) -> pgm_read_byte(p) progmem_read_ptr(p) -> pgm_read_ptr(p) cast progmem_read_uint16(p) -> pgm_read_word(p) Mark them __attribute__((always_inline)) inline in hal_esp8266.h so the wrapper call/return is eliminated at every call site, and remove the out-of-line definitions from components/esp8266/core.cpp. The IRAM_ATTR previously on delayMicroseconds() was decorative — its body calls delay_microseconds_safe() which lives in flash, so an IRAM ISR caller already jumped from SRAM into flash. Inlining is no worse than the prior code (same reasoning as the libretiny IRAM_ATTR note in the parent commit's PR description). The dispatcher hal.h now gates its delayMicroseconds/arch_feed_wdt declarations behind #ifndef USE_ESP8266 so clang-tidy does not flag them as redundant on top of the inline definitions.
Description
ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems.
Readme
Multiple Licenses
600 MiB
Languages
C++
55.7%
Python
43.7%
C
0.3%
JavaScript
0.2%
