diff options
author | Damien George <damien.p.george@gmail.com> | 2019-01-23 17:26:39 +1100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2019-01-25 12:18:34 +1100 |
commit | acd647100b0fb02aab32500c4a3ffd0faceae7e8 (patch) | |
tree | 4f0bee91b7179cf9ba01e20ecdb4d39436157ef2 /docs/library/esp32.rst | |
parent | 69e72954ad4757f8e3faccef6333cb33842ce052 (diff) | |
download | micropython-acd647100b0fb02aab32500c4a3ffd0faceae7e8.tar.gz micropython-acd647100b0fb02aab32500c4a3ffd0faceae7e8.zip |
docs/library: Add documentation for esp32 module.
Diffstat (limited to 'docs/library/esp32.rst')
-rw-r--r-- | docs/library/esp32.rst | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/docs/library/esp32.rst b/docs/library/esp32.rst new file mode 100644 index 0000000000..c934ef0954 --- /dev/null +++ b/docs/library/esp32.rst @@ -0,0 +1,66 @@ +:mod:`esp32` --- functionality specific to the ESP32 +==================================================== + +.. module:: esp32 + :synopsis: functionality specific to the ESP32 + +The ``esp32`` module contains functions and classes specifically aimed at +controlling ESP32 modules. + + +Functions +--------- + +.. function:: wake_on_touch(wake) + + Configure whether or not a touch will wake the device from sleep. + *wake* should be a boolean value. + +.. function:: wake_on_ext0(pin, level) + + Configure how EXT0 wakes the device from sleep. *pin* can be ``None`` + or a valid Pin object. *level* should be ``esp32.WAKEUP_ALL_LOW`` or + ``esp32.WAKEUP_ANY_HIGH``. + +.. function:: wake_on_ext1(pins, level) + + Configure how EXT1 wakes the device from sleep. *pins* can be ``None`` + or a tuple/list of valid Pin objects. *level* should be ``esp32.WAKEUP_ALL_LOW`` + or ``esp32.WAKEUP_ANY_HIGH``. + +.. function:: raw_temperature() + + Read the raw value of the internal temperature sensor, returning an integer. + +.. function:: hall_sensor() + + Read the raw value of the internal Hall sensor, returning an integer. + + +The Ultra-Low-Power co-processor +-------------------------------- + +.. class:: ULP() + + This class provides access to the Ultra-Low-Power co-processor. + +.. method:: ULP.set_wakeup_period(period_index, period_us) + + Set the wake-up period. + +.. method:: ULP.load_binary(load_addr, program_binary) + + Load a *program_binary* into the ULP at the given *load_addr*. + +.. method:: ULP.run(entry_point) + + Start the ULP running at the given *entry_point*. + + +Constants +--------- + +.. data:: esp32.WAKEUP_ALL_LOW + esp32.WAKEUP_ANY_HIGH + + Selects the wake level for pins. |