mirror of
https://github.com/micropython/micropython.git
synced 2026-01-07 20:50:14 +01:00
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>
This commit is contained in:
committed by
Damien George
parent
2762fe680a
commit
b4ab3a893c
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user