Zephyr API 3.6.99
Loading...
Searching...
No Matches
retained_mem.h File Reference

Public API for retained memory drivers. More...

#include <stdint.h>
#include <stddef.h>
#include <sys/types.h>
#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <zephyr/types.h>
#include <zephyr/sys/math_extras.h>
#include <zephyr/syscalls/retained_mem.h>

Go to the source code of this file.

Data Structures

struct  retained_mem_driver_api
 Retained memory driver API API which can be used by a device to store data in a retained memory area. More...
 

Typedefs

typedef ssize_t(* retained_mem_size_api) (const struct device *dev)
 Callback API to get size of retained memory area.
 
typedef int(* retained_mem_read_api) (const struct device *dev, off_t offset, uint8_t *buffer, size_t size)
 Callback API to read from retained memory area.
 
typedef int(* retained_mem_write_api) (const struct device *dev, off_t offset, const uint8_t *buffer, size_t size)
 Callback API to write to retained memory area.
 
typedef int(* retained_mem_clear_api) (const struct device *dev)
 Callback API to clear retained memory area (reset all data to 0x00).
 

Functions

 sizeof (size_t))
 
ssize_t retained_mem_size (const struct device *dev)
 Returns the size of the retained memory area.
 
int retained_mem_read (const struct device *dev, off_t offset, uint8_t *buffer, size_t size)
 Reads data from the Retained memory area.
 
int retained_mem_write (const struct device *dev, off_t offset, const uint8_t *buffer, size_t size)
 Writes data to the Retained memory area - underlying data does not need to be cleared prior to writing.
 
int retained_mem_clear (const struct device *dev)
 Clears data in the retained memory area by setting it to 0x00.
 

Variables

Size of off_t must be equal or less than size of size_t
 

Detailed Description

Public API for retained memory drivers.

Function Documentation

◆ sizeof()

sizeof ( size_t )

Variable Documentation

◆ size_t

Size of off_t must be equal or less than size of size_t