-
Notifications
You must be signed in to change notification settings - Fork 122
ESP32: add support to light sleep #1789
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: release-0.6
Are you sure you want to change the base?
Conversation
778ca20
to
0cb4308
Compare
@@ -513,6 +528,47 @@ static term nif_esp_deep_sleep_enable_gpio_wakeup(Context *ctx, int argc, term a | |||
} | |||
#endif | |||
|
|||
static term nif_esp_gpio_wakeup_enable(Context *ctx, int argc, term argv[]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would call this gpio:wakeup_enable/2
to match with the esp-idf function name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this means we are leaking more ESP32 specific stuff into GPIO module. I think they can be made somehow generic, but I'm not sure how.
There is something that I'd like to here the opinion about: Should we use the |
We could use BEAM documentation reads:
|
Allow putting ESP32 to light sleep, and wake it up using a GPIO or a timer. Signed-off-by: Davide Bettio <[email protected]>
0cb4308
to
4d62044
Compare
This is an interesting suggestion, and might be useful to expose an API for pushing other “monitored” events, like acquiring or loosing a network connection. I think some standardized notification system would be good, but it should be opt in, so extra resources are not consumed if they are not used. |
Allow putting ESP32 to light sleep, and wake it up using a GPIO or a timer.
These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).
SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later