Skip to content
Snippets Groups Projects
Commit 06ec96b4 authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

docs/machine: Generalize docs from just WiPy to other ports.

parent cfc94bec
Branches
No related tags found
No related merge requests found
...@@ -18,6 +18,8 @@ Reset related functions ...@@ -18,6 +18,8 @@ Reset related functions
Get the reset cause. See :ref:`constants <machine_constants>` for the possible return values. Get the reset cause. See :ref:`constants <machine_constants>` for the possible return values.
.. only:: port_wipy
Interrupt related functions Interrupt related functions
--------------------------- ---------------------------
...@@ -69,9 +71,11 @@ Power related functions ...@@ -69,9 +71,11 @@ Power related functions
Stops the CPU and all peripherals including WLAN. Execution is resumed from main, just Stops the CPU and all peripherals including WLAN. Execution is resumed from main, just
as with a reset. The reset cause can be checked to know that we are coming from as with a reset. The reset cause can be checked to know that we are coming from
from ``machine.DEEPSLEEP``. Wake sources are ``Pin`` and ``RTC``. Current consumption ``machine.DEEPSLEEP``. Wake sources are ``Pin`` and ``RTC``. Current consumption
is reduced to ~5uA. is reduced to ~5uA.
.. only:: port_wipy
.. function:: wake_reason() .. function:: wake_reason()
Get the wake reason. See :ref:`constants <machine_constants>` for the possible return values. Get the wake reason. See :ref:`constants <machine_constants>` for the possible return values.
...@@ -79,6 +83,8 @@ Power related functions ...@@ -79,6 +83,8 @@ Power related functions
Miscellaneous functions Miscellaneous functions
----------------------- -----------------------
.. only:: port_wipy
.. function:: main(filename) .. function:: main(filename)
Set the filename of the main script to run after boot.py is finished. If Set the filename of the main script to run after boot.py is finished. If
...@@ -92,8 +98,10 @@ Miscellaneous functions ...@@ -92,8 +98,10 @@ Miscellaneous functions
.. function:: unique_id() .. function:: unique_id()
Returns a string of 6 bytes (48 bits), which is the unique ID of the MCU. Returns a byte string with a unique idenifier of a board/SoC. It will vary
This also corresponds to the network ``MAC address``. from a board/SoC instance to another, if underlying hardware allows. Length
varies by hardware (so use substring of a full value if you expect a short
ID). In some MicroPython ports, ID corresponds to the network MAC address.
.. _machine_constants: .. _machine_constants:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment