mirror of
https://github.com/esphome/esphome.git
synced 2026-07-10 08:55:36 +00:00
ec833ce2d9b234334d0a2b29aa52b51211deb09e
The host platform's wake plumbing was split between wake.cpp (which had
wake_loop_threadsafe()) and application.{h,cpp} (which owned the fd
registry, wake socket lifecycle, select() loop, and readiness query).
The split required application.h to friend wake_loop_threadsafe() and
expose the wake socket fd, and forced a host-only out-of-line override
of yield_with_select_() that was equivalent to wakeable_delay() on every
other platform.
Consolidate the host wake mechanism in wake.h/wake.cpp:
- New host-only API: wake_register_fd, wake_unregister_fd, wake_fd_ready,
wake_setup, wake_drain_notifications.
- Host implementation of internal::wakeable_delay now performs the
select() over registered fds, mirroring the role of xTaskNotifyTake on
ESP32 and esp_delay on ESP8266.
- Application drops the host-specific socket_fds_, max_fd_,
wake_socket_fd_, socket_fds_changed_, read_fds_, base_read_fds_
members, the host include block (sys/select.h, sys/socket.h, etc.),
and the friend declarations for wake_loop_threadsafe() and
socket::socket_ready_fd().
- yield_with_select_() collapses to a single inline definition for all
platforms that delegates to wakeable_delay().
- Socket factories (bsd_sockets_impl.cpp, lwip_sockets_impl.cpp) and
socket::socket_ready_fd() now call the wake.h API directly instead of
going through App.
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%
