3#ifndef __VSF_ESPIDF_NVS_H__
4#define __VSF_ESPIDF_NVS_H__
21#define ESP_ERR_NVS_BASE 0x1100
22#define ESP_ERR_NVS_NOT_INITIALIZED (ESP_ERR_NVS_BASE + 0x01)
23#define ESP_ERR_NVS_NOT_FOUND (ESP_ERR_NVS_BASE + 0x02)
24#define ESP_ERR_NVS_TYPE_MISMATCH (ESP_ERR_NVS_BASE + 0x03)
25#define ESP_ERR_NVS_READ_ONLY (ESP_ERR_NVS_BASE + 0x04)
26#define ESP_ERR_NVS_NOT_ENOUGH_SPACE (ESP_ERR_NVS_BASE + 0x05)
27#define ESP_ERR_NVS_INVALID_NAME (ESP_ERR_NVS_BASE + 0x06)
28#define ESP_ERR_NVS_INVALID_HANDLE (ESP_ERR_NVS_BASE + 0x07)
29#define ESP_ERR_NVS_REMOVE_FAILED (ESP_ERR_NVS_BASE + 0x08)
30#define ESP_ERR_NVS_KEY_TOO_LONG (ESP_ERR_NVS_BASE + 0x09)
31#define ESP_ERR_NVS_PAGE_FULL (ESP_ERR_NVS_BASE + 0x0a)
32#define ESP_ERR_NVS_INVALID_STATE (ESP_ERR_NVS_BASE + 0x0b)
33#define ESP_ERR_NVS_INVALID_LENGTH (ESP_ERR_NVS_BASE + 0x0c)
34#define ESP_ERR_NVS_NO_FREE_PAGES (ESP_ERR_NVS_BASE + 0x0d)
35#define ESP_ERR_NVS_VALUE_TOO_LONG (ESP_ERR_NVS_BASE + 0x0e)
36#define ESP_ERR_NVS_PART_NOT_FOUND (ESP_ERR_NVS_BASE + 0x0f)
37#define ESP_ERR_NVS_NEW_VERSION_FOUND (ESP_ERR_NVS_BASE + 0x10)
38#define ESP_ERR_NVS_XTS_ENCR_FAILED (ESP_ERR_NVS_BASE + 0x11)
39#define ESP_ERR_NVS_XTS_DECR_FAILED (ESP_ERR_NVS_BASE + 0x12)
40#define ESP_ERR_NVS_XTS_CFG_FAILED (ESP_ERR_NVS_BASE + 0x13)
41#define ESP_ERR_NVS_XTS_CFG_NOT_FOUND (ESP_ERR_NVS_BASE + 0x14)
42#define ESP_ERR_NVS_ENCR_NOT_SUPPORTED (ESP_ERR_NVS_BASE + 0x15)
43#define ESP_ERR_NVS_KEYS_NOT_INITIALIZED (ESP_ERR_NVS_BASE + 0x16)
44#define ESP_ERR_NVS_CORRUPT_KEY_PART (ESP_ERR_NVS_BASE + 0x17)
45#define ESP_ERR_NVS_CONTENT_DIFFERS (ESP_ERR_NVS_BASE + 0x18)
46#define ESP_ERR_NVS_WRONG_ENCRYPTION (ESP_ERR_NVS_BASE + 0x19)
52#define NVS_DEFAULT_PART_NAME "nvs"
53#define NVS_PART_NAME_MAX_SIZE 16
54#define NVS_KEY_NAME_MAX_SIZE 16
55#define NVS_NS_NAME_MAX_SIZE NVS_KEY_NAME_MAX_SIZE
130 const char *namespace_name,
168 char *out_value,
size_t *
length);
170 void *out_value,
size_t *
length);
int esp_err_t
Definition esp_err.h:41
nvs_open_mode_t
Definition nvs.h:70
@ NVS_READONLY
Definition nvs.h:71
@ NVS_READWRITE
Definition nvs.h:72
esp_err_t nvs_set_u8(nvs_handle_t handle, const char *key, uint8_t value)
esp_err_t nvs_entry_next(nvs_iterator_t *iterator)
Definition nvs_flash_port.c:882
esp_err_t nvs_erase_key(nvs_handle_t handle, const char *key)
Definition nvs_flash_port.c:760
uint32_t nvs_handle_t
Definition nvs.h:64
esp_err_t nvs_entry_find(const char *part_name, const char *namespace_name, nvs_type_t type, nvs_iterator_t *output_iterator)
Definition nvs_flash_port.c:853
esp_err_t nvs_open_from_partition(const char *part_name, const char *namespace_name, nvs_open_mode_t open_mode, nvs_handle_t *out_handle)
Definition nvs_flash_port.c:572
esp_err_t nvs_set_blob(nvs_handle_t handle, const char *key, const void *value, size_t length)
Definition nvs_flash_port.c:684
#define NVS_NS_NAME_MAX_SIZE
Definition nvs.h:55
void nvs_release_iterator(nvs_iterator_t iterator)
Definition nvs_flash_port.c:918
esp_err_t nvs_set_i32(nvs_handle_t handle, const char *key, int32_t value)
esp_err_t nvs_get_blob(nvs_handle_t handle, const char *key, void *out_value, size_t *length)
Definition nvs_flash_port.c:750
esp_err_t nvs_get_u16(nvs_handle_t handle, const char *key, uint16_t *out_value)
esp_err_t nvs_set_i64(nvs_handle_t handle, const char *key, int64_t value)
esp_err_t nvs_open(const char *namespace_name, nvs_open_mode_t open_mode, nvs_handle_t *out_handle)
Definition nvs_flash_port.c:565
esp_err_t nvs_get_i16(nvs_handle_t handle, const char *key, int16_t *out_value)
esp_err_t nvs_set_str(nvs_handle_t handle, const char *key, const char *value)
Definition nvs_flash_port.c:677
void nvs_close(nvs_handle_t handle)
Definition nvs_flash_port.c:601
esp_err_t nvs_set_i8(nvs_handle_t handle, const char *key, int8_t value)
#define NVS_KEY_NAME_MAX_SIZE
Definition nvs.h:54
esp_err_t nvs_get_i8(nvs_handle_t handle, const char *key, int8_t *out_value)
nvs_type_t
Definition nvs.h:79
@ NVS_TYPE_I32
Definition nvs.h:85
@ NVS_TYPE_U64
Definition nvs.h:86
@ NVS_TYPE_U8
Definition nvs.h:80
@ NVS_TYPE_STR
Definition nvs.h:88
@ NVS_TYPE_ANY
Definition nvs.h:90
@ NVS_TYPE_I8
Definition nvs.h:81
@ NVS_TYPE_I16
Definition nvs.h:83
@ NVS_TYPE_I64
Definition nvs.h:87
@ NVS_TYPE_BLOB
Definition nvs.h:89
@ NVS_TYPE_U32
Definition nvs.h:84
@ NVS_TYPE_U16
Definition nvs.h:82
esp_err_t nvs_set_u32(nvs_handle_t handle, const char *key, uint32_t value)
esp_err_t nvs_get_u32(nvs_handle_t handle, const char *key, uint32_t *out_value)
esp_err_t nvs_commit(nvs_handle_t handle)
Definition nvs_flash_port.c:607
esp_err_t nvs_erase_all(nvs_handle_t handle)
Definition nvs_flash_port.c:775
esp_err_t nvs_get_stats(const char *part_name, nvs_stats_t *nvs_stats)
Definition nvs_flash_port.c:799
esp_err_t nvs_get_i32(nvs_handle_t handle, const char *key, int32_t *out_value)
esp_err_t nvs_get_i64(nvs_handle_t handle, const char *key, int64_t *out_value)
esp_err_t nvs_get_str(nvs_handle_t handle, const char *key, char *out_value, size_t *length)
Definition nvs_flash_port.c:744
esp_err_t nvs_set_u64(nvs_handle_t handle, const char *key, uint64_t value)
esp_err_t nvs_get_u64(nvs_handle_t handle, const char *key, uint64_t *out_value)
struct nvs_opaque_iterator_t * nvs_iterator_t
Definition nvs.h:107
esp_err_t nvs_set_i16(nvs_handle_t handle, const char *key, int16_t value)
esp_err_t nvs_set_u16(nvs_handle_t handle, const char *key, uint16_t value)
esp_err_t nvs_get_used_entry_count(nvs_handle_t handle, size_t *used_entries)
Definition nvs_flash_port.c:820
esp_err_t nvs_get_u8(nvs_handle_t handle, const char *key, uint8_t *out_value)
esp_err_t nvs_entry_info(const nvs_iterator_t iterator, nvs_entry_info_t *out_info)
Definition nvs_flash_port.c:902
unsigned short uint16_t
Definition stdint.h:7
unsigned uint32_t
Definition stdint.h:9
int int32_t
Definition stdint.h:8
long long int64_t
Definition stdint.h:10
short int16_t
Definition stdint.h:6
unsigned long long uint64_t
Definition stdint.h:11
unsigned char uint8_t
Definition stdint.h:5
signed char int8_t
Definition stdint.h:4
nvs_type_t type
Definition nvs.h:100
Definition nvs_flash_port.c:141
size_t used_entries
Definition nvs.h:114
size_t free_entries
Definition nvs.h:115
size_t namespace_count
Definition nvs.h:117
size_t total_entries
Definition nvs.h:116
vk_av_control_value_t value
Definition vsf_audio.h:171
vk_av_control_type_t type
Definition vsf_audio.h:170
uint_fast8_t length
Definition vsf_pbuf.c:38