8#ifndef ZEPHYR_INCLUDE_SETTINGS_SETTINGS_H_
9#define ZEPHYR_INCLUDE_SETTINGS_SETTINGS_H_
33#define SETTINGS_MAX_DIR_DEPTH 8
34#define SETTINGS_MAX_NAME_LEN (8 * SETTINGS_MAX_DIR_DEPTH)
35#define SETTINGS_MAX_VAL_LEN 256
36#define SETTINGS_NAME_SEPARATOR '/'
37#define SETTINGS_NAME_END '='
42#define SETTINGS_EXTRA_LEN ((SETTINGS_MAX_DIR_DEPTH - 1) + 2)
69 int (*
h_get)(
const char *
key,
char *val,
int val_len_max);
135 int (*
h_get)(
const char *
key,
char *val,
int val_len_max);
200#define SETTINGS_STATIC_HANDLER_DEFINE(_hname, _tree, _get, _set, _commit, \
202 const STRUCT_SECTION_ITERABLE(settings_handler_static, \
203 settings_handler_ ## _hname) = { \
207 .h_commit = _commit, \
208 .h_export = _export, \
436 const char *value,
size_t val_len);
552#ifdef CONFIG_SETTINGS_RUNTIME
void
Definition: eswifi_shell.c:15
void settings_dst_register(struct settings_store *cs)
struct settings_handler_static * settings_parse_and_lookup(const char *name, const char **next)
void settings_src_register(struct settings_store *cs)
int settings_call_set_handler(const char *name, size_t len, settings_read_cb read_cb, void *read_cb_arg, const struct settings_load_arg *load_arg)
int settings_name_steq(const char *name, const char *key, const char **next)
int settings_name_next(const char *name, const char **next)
int settings_runtime_get(const char *name, void *data, size_t len)
int settings_runtime_set(const char *name, const void *data, size_t len)
int settings_runtime_commit(const char *name)
int settings_delete(const char *name)
int settings_commit_subtree(const char *subtree)
int settings_load_subtree_direct(const char *subtree, settings_load_direct_cb cb, void *param)
ssize_t(* settings_read_cb)(void *cb_arg, void *data, size_t len)
Definition: settings.h:57
int settings_commit(void)
int(* settings_load_direct_cb)(const char *key, size_t len, settings_read_cb read_cb, void *cb_arg, void *param)
Definition: settings.h:274
int settings_register(struct settings_handler *cf)
int settings_load_subtree(const char *subtree)
int settings_save_one(const char *name, const void *value, size_t val_len)
int settings_subsys_init(void)
__SIZE_TYPE__ ssize_t
Definition: types.h:28
Single-linked list implementation.
struct _snode sys_snode_t
Definition: slist.h:33
static k_spinlock_key_t key
Definition: spinlock_error_case.c:14
Definition: settings.h:130
int(* h_commit)(void)
Definition: settings.h:162
int(* h_set)(const char *key, size_t len, settings_read_cb read_cb, void *cb_arg)
Definition: settings.h:147
const char * name
Definition: settings.h:132
int(* h_export)(int(*export_func)(const char *name, const void *val, size_t val_len))
Definition: settings.h:167
int(* h_get)(const char *key, char *val, int val_len_max)
Definition: settings.h:135
Definition: settings.h:64
int(* h_export)(int(*export_func)(const char *name, const void *val, size_t val_len))
Definition: settings.h:103
sys_snode_t node
Definition: settings.h:121
int(* h_set)(const char *key, size_t len, settings_read_cb read_cb, void *cb_arg)
Definition: settings.h:81
int(* h_get)(const char *key, char *val, int val_len_max)
Definition: settings.h:69
const char * name
Definition: settings.h:66
int(* h_commit)(void)
Definition: settings.h:96
Definition: settings.h:386
const char * subtree
Name of the subtree to be loaded.
Definition: settings.h:392
void * param
Parameter for callback function.
Definition: settings.h:404
settings_load_direct_cb cb
Pointer to the callback function.
Definition: settings.h:398
Definition: settings.h:412
int(* csi_load)(struct settings_store *cs, const struct settings_load_arg *arg)
Definition: settings.h:413
int(* csi_save_end)(struct settings_store *cs)
Definition: settings.h:446
int(* csi_save_start)(struct settings_store *cs)
Definition: settings.h:428
int(* csi_save)(struct settings_store *cs, const char *name, const char *value, size_t val_len)
Definition: settings.h:435
Definition: settings.h:374
sys_snode_t cs_next
Definition: settings.h:375
const struct settings_store_itf * cs_itf
Definition: settings.h:378
static fdata_t data[2]
Definition: test_fifo_contexts.c:15