|
Zephyr API Documentation 4.4.0-rc1
A Scalable Open Source RTOS
|
Driver Operations Retained Memory driver operations More...
#include <zephyr/drivers/retained_mem.h>
Data Fields | |
| retained_mem_size_api | size |
| REQ Returns the size of the retained memory area. | |
| retained_mem_read_api | read |
| REQ Reads data from the Retained memory area. | |
| retained_mem_write_api | write |
| REQ Writes data to the Retained memory area - underlying data does not need to be cleared prior to writing. | |
| retained_mem_clear_api | clear |
| REQ Clears data in the retained memory area by setting it to 0x00. | |
Driver Operations Retained Memory driver operations
This is the driver API structure any Retained Memory driver needs to define. It contains function pointers to the operations the driver implements, as well as any other driver-specific constant data.
Members marked with REQ MUST be set by the driver, whereas those marked with OPT are optional.
API which can be used by a device to store data in a retained memory area. Retained memory is memory that is retained while the device is powered but is lost when power to the device is lost (note that low power modes in some devices may clear the data also). This may be in a non-initialised RAM region, or in specific registers, but is not reset when a different application begins execution or the device is rebooted (without power loss). It must support byte-level reading and writing without a need to erase data before writing.
Note that drivers must implement all functions, none of the functions are optional.
| retained_mem_clear_api retained_mem_driver_api::clear |
REQ Clears data in the retained memory area by setting it to 0x00.
| retained_mem_read_api retained_mem_driver_api::read |
REQ Reads data from the Retained memory area.
| retained_mem_size_api retained_mem_driver_api::size |
REQ Returns the size of the retained memory area.
| retained_mem_write_api retained_mem_driver_api::write |
REQ Writes data to the Retained memory area - underlying data does not need to be cleared prior to writing.