diff options
| author | Meir Armon <meirarmon@gmail.com> | 2025-06-16 07:57:00 +0300 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2025-11-13 14:27:30 +1100 |
| commit | b4ab3a893c55858c9bf5d644c56abc0d9f7e7f44 (patch) | |
| tree | 93a029960aa4589f2b5f460114b2bf426b4bfb9e /ports/esp32/machine_rtc.c | |
| parent | 2762fe680a03706d3c21efe51db9b1f8d193d2d0 (diff) | |
esp32/modesp32: Add esp32.wake_on_gpio() function.
Some boards support waking up via GPIO pins, but this is not currently
supported by MicroPython. This commit adds support for waking with GPIO in
a similar interface to waking with ext0, ext1, touch and ulp. This commit
adds documentation for this new function as well.
Signed-off-by: Meir Armon <meirarmon@gmail.com>
Diffstat (limited to 'ports/esp32/machine_rtc.c')
| -rw-r--r-- | ports/esp32/machine_rtc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ports/esp32/machine_rtc.c b/ports/esp32/machine_rtc.c index ee6b1ad5c..d11ee22b5 100644 --- a/ports/esp32/machine_rtc.c +++ b/ports/esp32/machine_rtc.c @@ -86,8 +86,9 @@ machine_rtc_config_t machine_rtc_config = { .ext1_pins = 0, #endif #if SOC_PM_SUPPORT_EXT0_WAKEUP - .ext0_pin = -1 + .ext0_pin = -1, #endif + .gpio_pins = 0, }; static mp_obj_t machine_rtc_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { |
