Skip to content

Commit

Permalink
docs/library/machine.RTC: Add docs for RTC.memory() method.
Browse files Browse the repository at this point in the history
Co-Authored-By: glenn20 <[email protected]>

Signed-off-by: Amirreza Hamzavi <[email protected]>
  • Loading branch information
AmirHmZz authored and dpgeorge committed Mar 26, 2024
1 parent a0d31e5 commit 57de9da
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/library/machine.RTC.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,21 @@ Methods
- ``wake`` specifies the sleep mode from where this interrupt can wake
up the system.

.. method:: RTC.memory([data])

``RTC.memory(data)`` will write *data* to the RTC memory, where *data* is any
object which supports the buffer protocol (including `bytes`, `bytearray`,
`memoryview` and `array.array`). ``RTC.memory()`` reads RTC memory and returns
a `bytes` object.

Data written to RTC user memory is persistent across restarts, including
`machine.soft_reset()` and `machine.deepsleep()`.

The maximum length of RTC user memory is 2048 bytes by default on esp32,
and 492 bytes on esp8266.

Availability: esp32, esp8266 ports.

Constants
---------

Expand Down

0 comments on commit 57de9da

Please sign in to comment.