esp32/modesp32: Add wake_on_ulp() so ULP can wake CPU from deepsleep.
Add esp32.wake_on_ulp() to give access to esp_sleep_enable_ulp_wakeup(), which is needed to allow the ULP co-processor to wake the main CPU from deep sleep.
This commit is contained in:
committed by
Damien George
parent
cf550ad9d1
commit
ba21f76f89
@@ -144,6 +144,12 @@ STATIC mp_obj_t machine_sleep_helper(wake_type_t wake_type, size_t n_args, const
|
||||
}
|
||||
}
|
||||
|
||||
if (machine_rtc_config.wake_on_ulp) {
|
||||
if (esp_sleep_enable_ulp_wakeup() != ESP_OK) {
|
||||
mp_raise_msg(&mp_type_RuntimeError, MP_ERROR_TEXT("esp_sleep_enable_ulp_wakeup() failed"));
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
switch (wake_type) {
|
||||
|
||||
Reference in New Issue
Block a user