![]() |
nRF Connect SDK API 3.4.99
|
| int sd_card_open_read_close | ( | char const *const | filename, |
| char *const | buf, | ||
| size_t * | size ) |
#include <sd_card.h>
Read data from file into the buffer.
| [in] | filename | Name of the target file for reading, the default location is the root directoy of SD card, accept absolute path under root of SD card. |
| [out] | buf | Pointer to the buffer to write the read data into. |
| [in,out] | size | Pointer to the number of bytes which wait to be read from the 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. |
| 0 | on success. |
| -EPERM | SD card operation is ongoing somewhere else. |
| -ENODEV | SD init failed. SD card likely not inserted. |
| Otherwise,error | from underlying drivers. |