Skip to content

Commit 7f716f1

Browse files
rghaddabkartben
authored andcommitted
doc: settings: new API functions
Add references to the new API functions that were added "csi_load_one" and "csi_get_val_len" Signed-off-by: Riadh Ghaddab <rghaddab@baylibre.com>
1 parent 7ae14eb commit 7f716f1

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

doc/services/storage/settings/index.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,14 @@ backend.
7878
This gets called when loading values from persistent storage using
7979
:c:func:`settings_load()`.
8080

81+
**csi_load_one**
82+
This gets called when loading only one item from persistent storage using
83+
:c:func:`settings_load_one()`.
84+
85+
**csi_get_val_len**
86+
This gets called when getting a value's length from persistent storage using
87+
:c:func:`settings_get_val_len()`.
88+
8189
**csi_save**
8290
This gets called when saving a single setting to persistent storage using
8391
:c:func:`settings_save_one()`.
@@ -148,6 +156,14 @@ After all data is loaded, the ``h_commit`` handler is issued,
148156
signalling the application that the settings were successfully
149157
retrieved.
150158

159+
Alternatively, a call to :c:func:`settings_load_one()` will load only one
160+
Settings entry and store it in the provided buffer.
161+
162+
Optionally, to get only the value's length associated with the Settings entry,
163+
a call to :c:func:`settings_get_val_len()` can be performed.
164+
This is used for example by applications that allocates dynamically the data
165+
buffer and needs to get the data size before reading it by settings_load_one().
166+
151167
Technically FCB and file backends may store some history of the entities.
152168
This means that the newest data entity is stored after any
153169
older existing data entities.

0 commit comments

Comments
 (0)