Myriota UltraLite SDK 2.4.0
Loading...
Searching...
No Matches

Non-volatile memory for persistent storage. More...

Macros

#define NVRAM_MEM_SIZE   2048
 Size of the user NVRAM in bytes.
 

Functions

MYRIOTA_HARDWARE_API void NvramClear ()
 Clear the NVRAM.
 
MYRIOTA_HARDWARE_API int NvramWrite (uint32_t Offset, const uint8_t *Buf, size_t Length)
 Write buffer contents to NVRAM, starting from offset.
 

Detailed Description

Non-volatile memory for persistent storage.

Function Documentation

◆ NvramClear()

MYRIOTA_HARDWARE_API void NvramClear ( )

Clear the NVRAM.

NVRAM should be cleared before overwriting the existing contents. The NVRAM is filled with 0xFF after being cleared.

◆ NvramWrite()

MYRIOTA_HARDWARE_API int NvramWrite ( uint32_t  Offset,
const uint8_t *  Buf,
size_t  Length 
)

Write buffer contents to NVRAM, starting from offset.

Parameters
OffsetThe offset in NVRAM to start writing.
Buf[in]Pointer to the buffer containing data to write.
LengthThe number of bytes to write.
Returns
0 if succeeded, -1 if failed.