ESPHome 2026.11.0-dev
Loading...
Searching...
No Matches
wake_rp2.h
Go to the documentation of this file.
1#pragma once
2
4
5#ifdef USE_RP2
6
7#include "esphome/core/hal.h"
8
9#include <hardware/sync.h>
10#include <pico/time.h>
11
12namespace esphome {
13
14inline void wake_scheduler_threadsafe() {
15 g_main_loop_woke = true;
16 __sev();
17}
18
19inline void wake_loop_any_context() {
20 // Set the wake-requested flag BEFORE the SEV so the consumer is guaranteed
21 // to see it on its next gate check.
22 wake_request_set();
24}
25
27
29namespace internal {
31} // namespace internal
32
33} // namespace esphome
34
35#endif // USE_RP2
void ESPHOME_ALWAYS_INLINE wakeable_delay(uint32_t ms)
Host wakeable_delay uses select() over the registered fds — defined in wake_host.cpp.
void wake_loop_threadsafe()
Non-ISR: always inline.
void wake_scheduler_threadsafe()
volatile bool g_main_loop_woke
void IRAM_ATTR wake_loop_any_context()
IRAM_ATTR entry point for ISR callers — defined in wake_esp8266.cpp.
static void uint32_t