Jesse Hills 9580a90f55 [esp32_hosted] Keep the esp_now shim off the main loop (peer cache + async)
ESPHome's espnow component drives esp_now_* from the main loop; on the P4 shim
each call is a blocking CustomRpc round-trip, so under co-processor load mesh
traffic stalls the loop (and the UI). Take the round-trips out of the hot path:

- Mirror the co-processor peer table locally (spinlock-guarded, since the
  esp_now_* symbols are public and not guaranteed to be called only from the
  main loop) so esp_now_is_peer_exist() answers with no round-trip — the espnow
  component calls it twice per received frame and once per send.
- Make esp_now_send() fire-and-forget: the frame is handed to the transport and
  the real TX result still arrives via the async SEND event, matching native
  esp_now_send semantics (which already report completion via the callback).
- Make esp_now_add_peer()/del_peer() fire-and-forget too, updating the mirror
  locally. Safe against a following send to a just-added peer: both ride the
  same in-order CustomRpc channel and the co-processor processes REQs FIFO, so
  ADD_PEER lands before the SEND. mod_peer stays synchronous (off the hot path).
2026-07-22 15:41:22 +12: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-07-09 12:30:54 +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
575 MiB
Languages
C++ 58.3%
Python 41.1%
C 0.3%
JavaScript 0.2%