nRF Connect SDK Bare Metal API 2.0.99
Loading...
Searching...
No Matches

◆ bm_zms_read()

ssize_t bm_zms_read ( struct bm_zms_fs * fs,
uint32_t id,
void * data,
size_t len )

#include <bm_zms.h>

Read an entry from the file system.

Parameters
fsPointer to the file system.
idID of the entry to be read.
dataPointer to data buffer.
lenNumber of bytes to read at most.
Returns
Number of bytes read. On success, it will be equal to the number of bytes requested to be read or less than that if the stored data has a smaller size than the requested one. On error, returns negative value of error codes defined in errno.h.
Return values
Numberof bytes read (> 0) on success.
-EFAULTif fs is NULL.
-EACCESif BM_ZMS is still not initialized.
-EIOif there is a memory read/write error.
-ENOENTif there is no entry with the given id.