The f_write writes data to a file.
FRESULT f_write ( FIL* FileObject, /* Pointer to the file object structure */ const void* Buffer, /* Pointer to the data to be written */ UINT ByteToWrite, /* Number of bytes to write */ UINT* ByteWritten /* Pointer to the variable to return number of bytes written */ );
The read/write pointer in the file object is increased in number of bytes written. After the function succeeded, *ByteWritten should be checked to detect disk full. In case of *ByteWritten < ByteToWrite, it means the disk got full during write operation.
This function is not available in read-only configuration.