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

◆ sd_card_open_write_close()

int sd_card_open_write_close ( char const *const  filename,
char const *const  data,
size_t *  size 
)

Write data from buffer into the file.

Note
If the file already exists, data will be appended to the end of the file.
Parameters
[in]filenameName of the target file for writing, the default location is the root directoy of SD card, accept absolute path under root of SD card.
[in]datawhich is going to be written into the file.
[in,out]sizePointer to the number of bytes which is going to be written. The actual written size will be returned.
Return values
0on success.
-EPERMSD card operation is ongoing somewhere else.
-ENODEVSD init failed. SD card likely not inserted.
Otherwise,errorfrom underlying drivers.