mirror of
https://github.com/esphome/esphome.git
synced 2026-05-12 01:50:31 +08:00
[core] Expose App.wake_loop_isrsafe() on ESP8266 (#15797)
This commit is contained in:
@@ -340,6 +340,9 @@ class Application {
|
||||
#if defined(USE_ESP32) || defined(USE_LIBRETINY)
|
||||
/// Wake from ISR (ESP32 and LibreTiny).
|
||||
static void IRAM_ATTR wake_loop_isrsafe(BaseType_t *px) { esphome::wake_loop_isrsafe(px); }
|
||||
#elif defined(USE_ESP8266)
|
||||
/// Wake from ISR (ESP8266). No task_woken arg — no FreeRTOS. Caller must be IRAM_ATTR.
|
||||
static void IRAM_ATTR ESPHOME_ALWAYS_INLINE wake_loop_isrsafe() { esphome::wake_loop_isrsafe(); }
|
||||
#endif
|
||||
|
||||
/// Wake from any context (ISR, thread, callback).
|
||||
|
||||
@@ -77,6 +77,9 @@ void wake_loop_any_context();
|
||||
/// Non-ISR: always inline.
|
||||
inline void wake_loop_threadsafe() { wake_loop_impl(); }
|
||||
|
||||
/// ISR-safe: no task_woken arg because ESP8266 has no FreeRTOS. Caller must be IRAM_ATTR.
|
||||
inline void ESPHOME_ALWAYS_INLINE wake_loop_isrsafe() { wake_loop_impl(); }
|
||||
|
||||
namespace internal {
|
||||
inline void wakeable_delay(uint32_t ms) {
|
||||
if (ms == 0) {
|
||||
|
||||
Reference in New Issue
Block a user