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

◆ bm_zms_read_hist()

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

#include <bm_zms.h>

Read a history 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 be read.
cntHistory counter: 0: latest entry, 1: one before latest ...
Returns
Number of bytes read. On success, it will be equal to the number of bytes requested to be read. When the return value is larger than the number of bytes requested to read this indicates not all bytes were read, and more data is available. 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 and history counter.