Add support to read/write a single block in the RTC Memory#7725
Conversation
Simple copy of karfas@9ec4b83 Copyright by @heikokue
Simple copy of karfas/micropython@9ec4b83 Copyright by @heikokue
|
The problem here is the design of RTC.memory() function in general. In #7133, I added a new function RTC.usermem() which returns a bytearray at the RTC memory address. Maybe we can combine these approaches in some way ? |
|
@karfas Your implementation looks much nicer than mine, a pitty I didn't see it when I started 😒 I am happy to pull back my PR in faviour of yours. Maybe you could re-use my unit tests. |
…es-in-support-matrix add port-specific modules to support matrix
|
This is an automated heads-up that we've just merged a Pull Request See #13763 A search suggests this PR might apply the STATIC macro to some C code. If it Although this is an automated message, feel free to @-reply to me directly if |
This Pull Request adds Slot read write of the RTC Memory.
It is an adoption of https://nodemcu.readthedocs.io/en/release/modules/rtcmem/
The core reason is to save memory if you want to persist various data in the RTC Memory. Until now, the whole block had to be read before modification (492 bytes on ESP8266). Now only a single slot of 4 bytes needs to be read.
ToDo:
atoi()working => it throws linker errors:undefined reference to 'atoi'rtc.memory32()? => How to add new functions?Unit tests: