Zephyr API Documentation  3.6.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
nvs.h File Reference
#include <sys/types.h>
#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <zephyr/toolchain.h>

Go to the source code of this file.

Data Structures

struct  nvs_fs
 Non-volatile Storage File system structure. More...
 

Functions

int nvs_mount (struct nvs_fs *fs)
 Mount an NVS file system onto the flash device specified in fs.
 
int nvs_clear (struct nvs_fs *fs)
 Clear the NVS file system from flash.
 
ssize_t nvs_write (struct nvs_fs *fs, uint16_t id, const void *data, size_t len)
 Write an entry to the file system.
 
int nvs_delete (struct nvs_fs *fs, uint16_t id)
 Delete an entry from the file system.
 
ssize_t nvs_read (struct nvs_fs *fs, uint16_t id, void *data, size_t len)
 Read an entry from the file system.
 
ssize_t nvs_read_hist (struct nvs_fs *fs, uint16_t id, void *data, size_t len, uint16_t cnt)
 Read a history entry from the file system.
 
ssize_t nvs_calc_free_space (struct nvs_fs *fs)
 Calculate the available free space in the file system.