[socket] Add socket wake support for RP2040 (#14498)
This commit is contained in:
1 parent
d0285cdc41
commit
c681dc8872
5 files changed
+93
-12
No files matched your search
@@ -322,11 +322,13 @@ void IRAM_ATTR HOT Component::enable_loop_soon_any_context() {
|
||||
// 8. Race condition with main loop is handled by clearing flag before processing
|
||||
this->pending_enable_loop_ = true;
|
||||
App.has_pending_enable_loop_requests_ = true;
|
||||
#if (defined(USE_LWIP_FAST_SELECT) && defined(USE_ESP32)) || (defined(USE_ESP8266) && defined(USE_SOCKET_IMPL_LWIP_TCP))
|
||||
#if (defined(USE_LWIP_FAST_SELECT) && defined(USE_ESP32)) || \
|
||||
((defined(USE_ESP8266) || defined(USE_RP2040)) && defined(USE_SOCKET_IMPL_LWIP_TCP))
|
||||
// Wake the main loop from sleep. Without this, the main loop would not
|
||||
// wake until the select/delay timeout expires (~16ms).
|
||||
// ESP32: uses xPortInIsrContext() to choose the correct FreeRTOS notify API.
|
||||
// ESP8266: sets socket wake flag and calls esp_schedule() to exit esp_delay() early.
|
||||
// RP2040: sets socket wake flag and calls __sev() to exit __wfe() early.
|
||||
Application::wake_loop_any_context();
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user