Using the deep sleep API from esp-idf for the #ESP32.
GPIO Example
(Only GPIOs which are have RTC functionality can be used: 0,2,4,12-15,25-27,32-39).
https://github.com/pcbreflux/espressi...
Timer Example
https://github.com/pcbreflux/espressi...
GPIO+Timer Example
https://github.com/pcbreflux/espressi...
Example
uses xtensa 5.2.0
esp-idf commit 21c7fc624af3a9eea287c51eee943732111d7b10