Skip to content

Commit ca37494

Browse files
pdgendtjhedberg
authored andcommitted
include: zephyr: nvmem: Add retval doxygen to read/write functions
Document the return values for the read/write NVMEM functions. Signed-off-by: Pieter De Gendt <[email protected]>
1 parent a02414a commit ca37494

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

include/zephyr/nvmem.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,9 @@ struct nvmem_cell {
316316
*
317317
* @kconfig_dep{CONFIG_NVMEM}
318318
*
319-
* @return 0 on success, negative errno code on failure.
319+
* @retval -EINVAL Invalid offset or length arguments.
320+
* @retval -ENXIO No runtime device API available.
321+
* @return the result of the underlying device API call.
320322
*/
321323
int nvmem_cell_read(const struct nvmem_cell *cell, void *data, off_t off, size_t len);
322324

@@ -330,7 +332,10 @@ int nvmem_cell_read(const struct nvmem_cell *cell, void *data, off_t off, size_t
330332
*
331333
* @kconfig_dep{CONFIG_NVMEM}
332334
*
333-
* @return 0 on success, negative errno code on failure.
335+
* @retval -EINVAL Invalid offset or length arguments.
336+
* @retval -EROFS Writing to a read-only NVMEM Cell.
337+
* @retval -ENXIO No runtime device API available.
338+
* @return the result of the underlying device API call.
334339
*/
335340
int nvmem_cell_write(const struct nvmem_cell *cell, const void *data, off_t off, size_t len);
336341

0 commit comments

Comments
 (0)