Loading...
Searching...
No Matches
Low-Power RTC Memory

Low-level RTC Memory peripheral driver. More...

Detailed Description

Low-level RTC Memory peripheral driver.

This API provides an interface to access low-power memory present on some RTCs. This memory is retained even when the rest of the system is powered off.

Files

file  rtc_mem.h
 Low-level RTC memory peripheral driver interface definitions.
 

Functions

size_t rtc_mem_size (void)
 Get the amount of RTC memory.
 
void rtc_mem_read (unsigned offset, void *data, size_t len)
 Read from RTC memory.
 
void rtc_mem_write (unsigned offset, const void *data, size_t len)
 Write to RTC memory.
 

Function Documentation

◆ rtc_mem_read()

void rtc_mem_read ( unsigned  offset,
void *  data,
size_t  len 
)

Read from RTC memory.

Note
Reading beyond rtc_mem_size are illegal and trigger an assertion / be discarded.
Parameters
[in]offsetOffset to the start of RTC memory in bytes
[out]dataDestination buffer
[in]lenAmount of bytes to read

◆ rtc_mem_size()

size_t rtc_mem_size ( void  )

Get the amount of RTC memory.

Returns
The usable amount of RTC memory in bytes

◆ rtc_mem_write()

void rtc_mem_write ( unsigned  offset,
const void *  data,
size_t  len 
)

Write to RTC memory.

Note
Writing beyond rtc_mem_size are illegal and trigger an assertion / be discarded.
Parameters
[in]offsetOffset to the start of RTC memory in bytes
[in]dataSource buffer
[in]lenAmount of bytes to write