12#ifndef ZEPHYR_INCLUDE_RETENTION_
13#define ZEPHYR_INCLUDE_RETENTION_
int retention_write(const struct device *dev, off_t offset, const uint8_t *buffer, size_t size)
Writes data to the retention area (underlying data does not need to be cleared prior to writing),...
int retention_read(const struct device *dev, off_t offset, uint8_t *buffer, size_t size)
Reads data from the retention area.
int retention_is_valid(const struct device *dev)
Checks if the underlying data in the retention area is valid or not.
int retention_clear(const struct device *dev)
Clears all data in the retention area (sets it to 0)
ssize_t retention_size(const struct device *dev)
Returns the size of the retention area.
__SIZE_TYPE__ ssize_t
Definition types.h:28
__INTPTR_TYPE__ off_t
Definition types.h:36
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
Runtime device structure (in ROM) per driver instance.
Definition device.h:510