settings: add API for check value size
Such API is convinient for check the persistent storage value size or whether the value is NULL. Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
This commit is contained in:
parent
03efd7d049
commit
e5a09ccb3e
7 changed files with 61 additions and 5 deletions
|
@ -197,6 +197,17 @@ int settings_commit(char *name);
|
|||
*/
|
||||
int settings_val_read_cb(void *value_ctx, void *buf, size_t len);
|
||||
|
||||
/**
|
||||
* This function fetch length of decode data.
|
||||
* This function should be used inside set handler in order to detect the
|
||||
* settings data length.
|
||||
*
|
||||
* @param[in] value_ctx Data contex provided by the <p>h_set</p> handler.
|
||||
*
|
||||
* @retval length of data.
|
||||
*/
|
||||
size_t settings_val_get_len_cb(void *value_ctx);
|
||||
|
||||
/**
|
||||
* @} settings
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue