summaryrefslogtreecommitdiff
path: root/docs/library
diff options
context:
space:
mode:
authorMeir Armon <meirarmon@gmail.com>2025-06-16 07:57:00 +0300
committerDamien George <damien@micropython.org>2025-11-13 14:27:30 +1100
commitb4ab3a893c55858c9bf5d644c56abc0d9f7e7f44 (patch)
tree93a029960aa4589f2b5f460114b2bf426b4bfb9e /docs/library
parent2762fe680a03706d3c21efe51db9b1f8d193d2d0 (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 'docs/library')
-rw-r--r--docs/library/esp32.rst9
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/library/esp32.rst b/docs/library/esp32.rst
index e5f39c7f5..84f33f46e 100644
--- a/docs/library/esp32.rst
+++ b/docs/library/esp32.rst
@@ -43,6 +43,15 @@ Functions
.. note:: This is only available for boards that have ext1 support.
+.. function:: wake_on_gpio(pins, level)
+
+ Configure how GPIO wakes the device from sleep. *pins* can be ``None``
+ or a tuple/list of valid Pin objects. *level* should be ``esp32.WAKEUP_ALL_LOW``
+ or ``esp32.WAKEUP_ANY_HIGH``.
+
+ .. note:: Some boards don't support waking on GPIO from deep sleep,
+ on those boards, the pins set here can only be used to wake from light sleep.
+
.. function:: gpio_deep_sleep_hold(enable)
Configure whether non-RTC GPIO pin configuration is retained during