Closed cwilling closed 1 year ago
Looks great - thanks! Very happy to have stuff like this if it makes the ESP32 port more usable.
I'm merging now, but quick question: Can esp_sleep_enable_ext0_wakeup
return an error code (eg if the wrong pin is specified like esp_sleep_enable_ext0_wakeup(700, ...)
?)
If so it might be worth checking it and doing jsExceptionHere(JSET_ERROR, "Invalid Arguments")
rather than trying to sleep the ESP32 with no way to wake it?
Thanks for the merge. I'll have a look at how to do the jsExceptionHere thing (still new to Espruino).
This PR adds ability for ESP32 boards to wake from deep sleep by trigger from external interrupt (setting a GPIO pin). It may be confirmed with this example code: