Lines Matching +full:dev +full:- +full:size
4 * SPDX-License-Identifier: Apache-2.0
35 typedef ssize_t (*retention_size_api)(const struct device *dev);
36 typedef int (*retention_is_valid_api)(const struct device *dev);
37 typedef int (*retention_read_api)(const struct device *dev, off_t offset, uint8_t *buffer,
38 size_t size);
39 typedef int (*retention_write_api)(const struct device *dev, off_t offset,
40 const uint8_t *buffer, size_t size);
41 typedef int (*retention_clear_api)(const struct device *dev);
44 retention_size_api size; member
52 * @brief Returns the size of the retention area.
54 * @param dev Retention device to use.
56 * @retval Positive value indicating size in bytes on success, else negative errno
59 ssize_t retention_size(const struct device *dev);
64 * @param dev Retention device to use.
68 * @retval -ENOTSUP If there is no header/checksum configured for the retention area.
69 * @retval -errno Error code code.
71 int retention_is_valid(const struct device *dev);
76 * @param dev Retention device to use.
79 * @param size Size of data to read.
82 * @retval -errno Error code code.
84 int retention_read(const struct device *dev, off_t offset, uint8_t *buffer, size_t size);
91 * @param dev Retention device to use.
94 * @param size Size of data to be written.
98 int retention_write(const struct device *dev, off_t offset, const uint8_t *buffer, size_t size);
103 * @param dev Retention device to use.
107 int retention_clear(const struct device *dev);