nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches

◆ sd_card_read()

int sd_card_read ( char *  buf,
size_t *  size,
struct fs_file_t *  f_seg_read_entry 
)

Read segment on the open file on the SD card.

Parameters
[out]bufPointer to the buffer to write the read data into.
[in,out]sizeNumber of bytes to be read from file. The actual read size will be returned. If the actual read size is 0, there will be a warning message which indicates that the file is empty.
[in,out]f_seg_read_entryPointer to a file object. After call to this function, the pointer gets updated and can be used as entry in next function call.
Return values
0on success.
-EPERMSD card operation is not ongoing.
-ENODEVSD init failed. SD likely not inserted.
Otherwise,errorfrom underlying drivers.