summaryrefslogtreecommitdiff
path: root/lib/uzlib/defl_static.h
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2022-06-29 00:22:49 +1000
committerDamien George <damien@micropython.org>2022-06-30 11:40:17 +1000
commitb004e7e397577d95404fd31aec68a5c54904a48c (patch)
tree266fa9f6938df7d28cbfb7a7a191f45c104d0eb8 /lib/uzlib/defl_static.h
parent932556d5fc09a196139170fe52436ea8a02020c1 (diff)
rp2/modmachine: Implement lightsleep() with optional sleep period.
This gets basic machine.lightsleep([n]) behaviour working on the rp2 port. It supports: - Calling lightsleep without a specified period, in which case it uses xosc dormant mode. There's currently no way to wake it up from this state, unless you write to raw registers to enable a GPIO wake up source. - Calling lightsleep with a period n in milliseconds. This period must be less than about 72 minutes and uses timer alarm3 to wake it up. The RTC continues to run during lightsleep, but other peripherals have their clock turned off during the sleep. It doesn't yet support longer periods than 72 minutes, or waking up from GPIO IRQ. Measured current consumption from the USB port on a PICO board is about 1.5mA when doing machine.lightsleep(5000), and about 0.9mA when doing machine.lightsleep(). Addresses issue #8770. Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'lib/uzlib/defl_static.h')
0 files changed, 0 insertions, 0 deletions