doc/settings: doxygen for settings read callback method

The callback typedef was not documented. This documentation
which explains what behavior is expected from any implementation.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
This commit is contained in:
Andrzej Puzdrowski 2019-08-09 12:20:48 +02:00 committed by Carles Cufí
commit 1ae2b9eff9

View file

@ -34,6 +34,19 @@ extern "C" {
*/
#define SETTINGS_EXTRA_LEN ((SETTINGS_MAX_DIR_DEPTH - 1) + 2)
/**
* Function used to read the data from the settings storage in
* h_set handler implementations.
*
* @param[in] cb_arg arguments for the read function. Appropriate cb_arg is
* transferred to h_set handler implementation by
* the backend.
* @param[out] data the destination buffer
* @param[in] len length of read
*
* @return positive: Number of bytes read, 0: key-value pair is deleted.
* On error returns -ERRNO code.
*/
typedef ssize_t (*settings_read_cb)(void *cb_arg, void *data, size_t len);
/**