Define wakeable_delay on all platforms, simplify yield_with_select_

This commit is contained in:
J. Nick Koston
2026-04-04 10:49:22 -10:00
parent eac783697a
commit 8cbf3e354b
2 changed files with 4 additions and 3 deletions
+1 -3
View File
@@ -916,10 +916,8 @@ inline void ESPHOME_ALWAYS_INLINE Application::yield_with_select_(uint32_t delay
// Sleep with instant wake via FreeRTOS task notification.
// Woken by: callback wrapper (socket data), wake_loop_threadsafe() (background tasks), or timeout.
esphome::wakeable_delay(delay_ms);
#elif defined(USE_ESP8266) || defined(USE_RP2040)
esphome::wakeable_delay(delay_ms);
#else
delay(delay_ms);
esphome::wakeable_delay(delay_ms);
#endif
}
#endif // !USE_SOCKET_SELECT_SUPPORT
+3
View File
@@ -112,6 +112,9 @@ void wake_loop_threadsafe();
/// Host: no ISR, just use threadsafe version.
inline void wake_loop_any_context() { wake_loop_threadsafe(); }
/// Host: select() handles the delay, this is a simple fallback.
inline void wakeable_delay(uint32_t ms) { delay(ms); }
#endif
} // namespace esphome