diff options
author | Damien George <damien.p.george@gmail.com> | 2014-10-31 01:37:19 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-10-31 01:37:19 +0000 |
commit | 88d3054ac072f9c73b0f3f045c59ba74f6730c1d (patch) | |
tree | 6db7851068908c0640b1ed306d6823871fd3d742 /docs/tutorial/power_ctrl.rst | |
parent | 7c4445afe104631d5fe8e7401d50f40f205e35b9 (diff) | |
download | micropython-88d3054ac072f9c73b0f3f045c59ba74f6730c1d.tar.gz micropython-88d3054ac072f9c73b0f3f045c59ba74f6730c1d.zip |
docs: Import documentation from source-code inline comments.
The inline docs (prefixed with /// in .c files) have been converted to
RST format and put in the docs subdirectory.
Diffstat (limited to 'docs/tutorial/power_ctrl.rst')
-rw-r--r-- | docs/tutorial/power_ctrl.rst | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/tutorial/power_ctrl.rst b/docs/tutorial/power_ctrl.rst new file mode 100644 index 0000000000..877b7cd7ee --- /dev/null +++ b/docs/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 |