ESPHome 2026.5.0b1
Loading...
Searching...
No Matches
wake_rp2040.h
Go to the documentation of this file.
1#pragma once
2
4
5#ifdef USE_RP2040
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_loop_any_context() {
15 // Set the wake-requested flag BEFORE the SEV so the consumer is guaranteed
16 // to see it on its next gate check.
17 wake_request_set();
18 g_main_loop_woke = true;
19 __sev();
20}
21
23
25namespace internal {
27} // namespace internal
28
29} // namespace esphome
30
31#endif // USE_RP2040
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.
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