kopia lustrzana https://github.com/micropython/micropython
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>pull/12559/head
rodzic
a0d31e54ae
commit
57de9da352
|
@ -75,6 +75,21 @@ Methods
|
||||||
- ``wake`` specifies the sleep mode from where this interrupt can wake
|
- ``wake`` specifies the sleep mode from where this interrupt can wake
|
||||||
up the system.
|
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
|
Constants
|
||||||
---------
|
---------
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue