mirror of
https://github.com/esphome/esphome.git
synced 2026-07-10 08:55:36 +00:00
325d9db499c4a5b346cab750fa491f656eaaf3ea
Arduino's ::delay() is implemented in core_esp8266_wiring.cpp alongside millis(). Because __delay calls millis() within the same compilation unit, --wrap=millis can't intercept that intra-object reference, which prevents the linker from garbage-collecting the original millis body (~80 bytes of IRAM). Replace esphome::delay() with a simple yield loop that uses our fast millis() accumulator. This has the same behavior as Arduino's delay: feeds the watchdog and processes SDK tasks via yield(), keeping WiFi alive. With __delay unreferenced, the linker can now GC both __delay and the original millis function.
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
545 MiB
Languages
C++
60.1%
Python
39.3%
C
0.3%
JavaScript
0.2%
