summaryrefslogtreecommitdiff
path: root/docs/library
diff options
context:
space:
mode:
authorMatt Trentini <matt.trentini@gmail.com>2019-01-22 08:06:17 +1100
committerDamien George <damien.p.george@gmail.com>2019-01-25 12:18:34 +1100
commit69e72954ad4757f8e3faccef6333cb33842ce052 (patch)
treef31b11e0f826e9cf1fdb5645400e757867d2458e /docs/library
parentf874e8184c345983dc4c702d308f9d2c6bf11a83 (diff)
docs: Add initial docs for esp32 port, including quick-ref and general.
With contributions from Oliver Robson (@HowManyOliversAreThere), Sean Lanigan (@seanlano) and @rprr.
Diffstat (limited to 'docs/library')
-rw-r--r--docs/library/esp.rst26
-rw-r--r--docs/library/index.rst6
2 files changed, 25 insertions, 7 deletions
diff --git a/docs/library/esp.rst b/docs/library/esp.rst
index 121a80d42..867182be9 100644
--- a/docs/library/esp.rst
+++ b/docs/library/esp.rst
@@ -1,10 +1,12 @@
-:mod:`esp` --- functions related to the ESP8266
-===============================================
+:mod:`esp` --- functions related to the ESP8266 and ESP32
+=========================================================
.. module:: esp
- :synopsis: functions related to the ESP8266
+ :synopsis: functions related to the ESP8266 and ESP32
-The ``esp`` module contains specific functions related to the ESP8266 module.
+The ``esp`` module contains specific functions related to both the ESP8266 and
+ESP32 modules. Some functions are only available on one or the other of these
+ports.
Functions
@@ -12,6 +14,8 @@ Functions
.. function:: sleep_type([sleep_type])
+ **Note**: ESP8266 only
+
Get or set the sleep type.
If the *sleep_type* parameter is provided, sets the sleep type to its
@@ -29,6 +33,8 @@ Functions
.. function:: deepsleep(time=0)
+ **Note**: ESP8266 only - use `machine.deepsleep()` on ESP32
+
Enter deep sleep.
The whole module powers down, except for the RTC clock circuit, which can
@@ -38,8 +44,18 @@ Functions
.. function:: flash_id()
+ **Note**: ESP8266 only
+
Read the device ID of the flash memory.
+.. function:: flash_size()
+
+ Read the total size of the flash memory.
+
+.. function:: flash_user_start()
+
+ Read the memory offset at which the user flash space begins.
+
.. function:: flash_read(byte_offset, length_or_buffer)
.. function:: flash_write(byte_offset, bytes)
@@ -48,6 +64,8 @@ Functions
.. function:: set_native_code_location(start, length)
+ **Note**: ESP8266 only
+
Set the location that native code will be placed for execution after it is
compiled. Native code is emitted when the ``@micropython.native``,
``@micropython.viper`` and ``@micropython.asm_xtensa`` decorators are applied
diff --git a/docs/library/index.rst b/docs/library/index.rst
index e37f1d625..290192fa0 100644
--- a/docs/library/index.rst
+++ b/docs/library/index.rst
@@ -139,10 +139,10 @@ The following libraries and classes are specific to the WiPy.
machine.TimerWiPy.rst
-Libraries specific to the ESP8266
----------------------------------
+Libraries specific to the ESP8266 and ESP32
+-------------------------------------------
-The following libraries are specific to the ESP8266.
+The following libraries are specific to the ESP8266 and ESP32.
.. toctree::
:maxdepth: 2