Skip to content

Commit 94fa39e

Browse files
committed
doc: lwm2m_carrier: Improve os_storage glue documentation.
Added more documentation to the os_storage functions. The text is based on the current zephyr nvs_read/write/delete(). Signed-off-by: Håvard Vermeer <[email protected]>
1 parent e2cfdfd commit 94fa39e

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

lib/bin/lwm2m_carrier/include/lwm2m_os.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,16 +330,33 @@ uint32_t lwm2m_os_rand_get(void);
330330

331331
/**
332332
* @brief Delete a non-volatile storage entry.
333+
*
334+
* @param[in] id of the entry to be deleted.
335+
*
336+
* @retval 0 If success
337+
* @retval -ERRNO errno code if error.
333338
*/
334339
int lwm2m_os_storage_delete(uint16_t id);
335340

336341
/**
337342
* @brief Read an entry from non-volatile storage.
343+
*
344+
* @param[in] id of the entry to be read.
345+
* @param[out] data Pointer to data buffer.
346+
* @param[in,out] len Number of bytes to be read.
347+
*
348+
* @return Number of bytes read. On error, returns a negative value.
338349
*/
339350
int lwm2m_os_storage_read(uint16_t id, void *data, size_t len);
340351

341352
/**
342353
* @brief Write an entry to non-volatile storage.
354+
*
355+
* @param[in] id ID of the entry to be written.
356+
* @param[in] data Pointer to the data to be written.
357+
* @param[in,out] len Number of bytes to be written.
358+
*
359+
* @return Number of bytes written. On error, returns a negative value.
343360
*/
344361
int lwm2m_os_storage_write(uint16_t id, const void *data, size_t len);
345362

0 commit comments

Comments
 (0)