summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/library/machine.rst16
1 files changed, 11 insertions, 5 deletions
diff --git a/docs/library/machine.rst b/docs/library/machine.rst
index 532266d1d..7d2eb26a7 100644
--- a/docs/library/machine.rst
+++ b/docs/library/machine.rst
@@ -127,14 +127,20 @@ Power related functions
.. function:: idle()
- Gates the clock to the CPU, useful to reduce power consumption at any time during
- short or long periods. Peripherals continue working and execution resumes as soon
- as any interrupt is triggered (on many ports this includes system timer
- interrupt occurring at regular intervals on the order of millisecond).
+ Gates the clock to the CPU, useful to reduce power consumption at any time
+ during short or long periods. Peripherals continue working and execution
+ resumes as soon as any interrupt is triggered, or at most one millisecond
+ after the CPU was paused.
+
+ It is recommended to call this function inside any tight loop that is
+ continuously checking for an external change (i.e. polling). This will reduce
+ power consumption without significantly impacting performance. To reduce
+ power consumption further then see the :func:`lightsleep`,
+ :func:`time.sleep()` and :func:`time.sleep_ms()` functions.
.. function:: sleep()
- .. note:: This function is deprecated, use `lightsleep()` instead with no arguments.
+ .. note:: This function is deprecated, use :func:`lightsleep()` instead with no arguments.
.. function:: lightsleep([time_ms])
deepsleep([time_ms])