J. Nick Koston 6cb131ce54 [esp8266] Use os_timer-based esp_delay() in delay()
Replace the poll-based busy-wait introduced in #15662 with a call to
Arduino's 1-arg esp_delay(), which uses os_timer + esp_suspend to
properly suspend the cont task for the requested duration.

The busy-wait only yielded via optimistic_yield(1000) once 1 ms had
elapsed since the last task switch, so short waits like delay(1) often
finished without ever yielding. That starved the SDK and extended
interrupt latency, breaking timing sensitive interrupt-driven code such
as the ESP8266 software-serial RX path used by fingerprint_grow.

esp_delay()'s 1-arg form does not itself call millis(), so the slow
Arduino millis() body is not pulled into IRAM by this path; the
--wrap=millis goal of #15662 is preserved.

Fixes #16558
2026-05-22 07:51:49 -05:00
2023-06-12 17:00:34 +12:00
2022-09-06 15:48:01 +12:00
2024-03-28 10:20:51 +13:00
2025-12-08 14:37:45 -05:00
2026-05-14 12:33:43 +12:00
S
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
601 MiB
Languages
C++ 55.8%
Python 43.6%
C 0.3%
JavaScript 0.2%