aboutsummaryrefslogtreecommitdiff
path: root/stand/common/bootstrap.h
diff options
context:
space:
mode:
Diffstat (limited to 'stand/common/bootstrap.h')
-rw-r--r--stand/common/bootstrap.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/stand/common/bootstrap.h b/stand/common/bootstrap.h
index 9637faa825dd..b6845aaaae00 100644
--- a/stand/common/bootstrap.h
+++ b/stand/common/bootstrap.h
@@ -344,6 +344,37 @@ void delay(int delay);
void dev_cleanup(void);
+/*
+ * nvstore API.
+ */
+typedef int (nvstore_getter_cb_t)(void *, const char *, void **);
+typedef int (nvstore_setter_cb_t)(void *, int, const char *,
+ const void *, size_t);
+typedef int (nvstore_setter_str_cb_t)(void *, const char *, const char *,
+ const char *);
+typedef int (nvstore_unset_cb_t)(void *, const char *);
+typedef int (nvstore_print_cb_t)(void *, void *);
+typedef int (nvstore_iterate_cb_t)(void *, int (*)(void *, void *));
+
+typedef struct nvs_callbacks {
+ nvstore_getter_cb_t *nvs_getter;
+ nvstore_setter_cb_t *nvs_setter;
+ nvstore_setter_str_cb_t *nvs_setter_str;
+ nvstore_unset_cb_t *nvs_unset;
+ nvstore_print_cb_t *nvs_print;
+ nvstore_iterate_cb_t *nvs_iterate;
+} nvs_callbacks_t;
+
+int nvstore_init(const char *, nvs_callbacks_t *, void *);
+int nvstore_fini(const char *);
+void *nvstore_get_store(const char *);
+int nvstore_print(void *);
+int nvstore_get_var(void *, const char *, void **);
+int nvstore_set_var(void *, int, const char *, void *, size_t);
+int nvstore_set_var_from_string(void *, const char *, const char *,
+ const char *);
+int nvstore_unset_var(void *, const char *);
+
#ifndef CTASSERT
#define CTASSERT(x) _Static_assert(x, "compile-time assertion failed")
#endif