Low-level RTC Memory peripheral driver.
More...
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.
|
file | rtc_mem.h |
| Low-level RTC memory peripheral driver interface definitions.
|
|
|
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.
|
|
◆ 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] | offset | Offset to the start of RTC memory in bytes |
[out] | data | Destination buffer |
[in] | len | Amount 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] | offset | Offset to the start of RTC memory in bytes |
[in] | data | Source buffer |
[in] | len | Amount of bytes to write |