Lines Matching refs:buffer
94 uint8_t buffer[CONFIG_RETENTION_BUFFER_SIZE]; in retention_checksum() local
99 uint16_t read_size = MIN((end - pos), sizeof(buffer)); in retention_checksum()
101 rc = retained_mem_read(config->parent, pos, buffer, read_size); in retention_checksum()
108 *output = (uint32_t)crc8(buffer, read_size, 0x12, in retention_checksum()
112 buffer, read_size); in retention_checksum()
114 *output = crc32_ieee_update(*output, buffer, read_size); in retention_checksum()
187 uint8_t buffer[CONFIG_RETENTION_BUFFER_SIZE]; in retention_is_valid() local
191 uint16_t read_size = MIN((config->prefix_len - pos), sizeof(buffer)); in retention_is_valid()
193 rc = retained_mem_read(config->parent, (config->offset + pos), buffer, in retention_is_valid()
200 if (memcmp(&config->prefix[pos], buffer, read_size) != 0) { in retention_is_valid()
267 int retention_read(const struct device *dev, off_t offset, uint8_t *buffer, size_t size) in retention_read() argument
280 (size_t)offset), buffer, size); in retention_read()
287 int retention_write(const struct device *dev, off_t offset, const uint8_t *buffer, size_t size) in retention_write() argument
305 (size_t)offset), buffer, size); in retention_write()
369 uint8_t buffer[CONFIG_RETENTION_BUFFER_SIZE]; in retention_clear() local
372 memset(buffer, 0, sizeof(buffer)); in retention_clear()
379 rc = retained_mem_write(config->parent, (config->offset + pos), buffer, in retention_clear()
380 MIN((config->size - pos), sizeof(buffer))); in retention_clear()
386 pos += MIN((config->size - pos), sizeof(buffer)); in retention_clear()