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] | filename | Name 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] | data | which is going to be written into the file. |
[in,out] | size | Pointer to the number of bytes which is going to be written. The actual written size will be returned. |
- Return values
-
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. |