aboutsummaryrefslogtreecommitdiff
path: root/docs/pyboard/tutorial/power_ctrl.rst
diff options
context:
space:
mode:
authorDaniel Campora2015-05-27 13:59:59 +0200
committerDamien George2015-06-04 23:44:35 +0100
commit7ca1bd314bd5e3146f8c868f91af54d17dd04d45 (patch)
treec30c7ccb9a8437a9e69f2716f196b87f27beca5d /docs/pyboard/tutorial/power_ctrl.rst
parent031278f661e5d285c56359e355a96161bf6e1a9f (diff)
docs: Generate a separate docs build for each port.
Using Damien's approach where conf.py and topindex.html are shared by all ports.
Diffstat (limited to 'docs/pyboard/tutorial/power_ctrl.rst')
-rw-r--r--docs/pyboard/tutorial/power_ctrl.rst13
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/pyboard/tutorial/power_ctrl.rst b/docs/pyboard/tutorial/power_ctrl.rst
new file mode 100644
index 000000000..877b7cd7e
--- /dev/null
+++ b/docs/pyboard/tutorial/power_ctrl.rst
@@ -0,0 +1,13 @@
+Power control
+=============
+
+:meth:`pyb.wfi` is used to reduce power consumption while waiting for an
+event such as an interrupt. You would use it in the following situation::
+
+ while True:
+ do_some_processing()
+ pyb.wfi()
+
+Control the frequency using :meth:`pyb.freq`::
+
+ pyb.freq(30000000) # set CPU frequency to 30MHz