summaryrefslogtreecommitdiffstatshomepage
path: root/docs/library
diff options
context:
space:
mode:
authorAmirreza Hamzavi <amirrezahamzavi2000@gmail.com>2023-10-01 14:30:15 +0330
committerDamien George <damien@micropython.org>2024-03-26 17:59:06 +1100
commit57de9da35233b4120a00386c52485e68bbc931fb (patch)
tree6ea13e988c7a4b910f1d8d0e917cb08207cc439d /docs/library
parenta0d31e54ae5219a2794784311b6df45b680007d2 (diff)
downloadmicropython-57de9da35233b4120a00386c52485e68bbc931fb.tar.gz
micropython-57de9da35233b4120a00386c52485e68bbc931fb.zip
docs/library/machine.RTC: Add docs for RTC.memory() method.
Co-Authored-By: glenn20 <glenn20@users.noreply.github.com> Signed-off-by: Amirreza Hamzavi <amirrezahamzavi2000@gmail.com>
Diffstat (limited to 'docs/library')
-rw-r--r--docs/library/machine.RTC.rst15
1 files changed, 15 insertions, 0 deletions
diff --git a/docs/library/machine.RTC.rst b/docs/library/machine.RTC.rst
index be2be2eee5..fcd78f1c39 100644
--- a/docs/library/machine.RTC.rst
+++ b/docs/library/machine.RTC.rst
@@ -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
---------