summaryrefslogtreecommitdiff
path: root/docs/esp32
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2018-12-15 16:20:18 +1100
committerDamien George <damien.p.george@gmail.com>2019-01-27 11:12:16 +1100
commitb16146d18907b921eefec527f7a700413309dd12 (patch)
tree6183b3bd1eaef0b6520119a3ead6f7748bb12754 /docs/esp32
parente33bc59712aa484107dc1cd4009dd8ab2da6dcb2 (diff)
docs/machine: Change sleep to lightsleep and add timeout arguments.
The machine.sleep() function can be misleading because it clashes with time.sleep() which has quite different semantics. So change it to machine.lightsleep() which shows that it is closer in behaviour to machine.deepsleep(). Also, add an optional argument to these two sleep functions to specify a maximum time to sleep for. This is a common operation and underlying hardware usually has a special way of performing this operation. The existing machine.sleep() function will remain for backwards compatibility purposes, and it can simply be an alias for machine.lightsleep() without arguments. The behaviour will be the same.
Diffstat (limited to 'docs/esp32')
0 files changed, 0 insertions, 0 deletions