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 */ WORD ByteToWrite, /* Number of bytes to write */ WORD* 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. The ByteWritten will become less than ByteToWrite when disk gets full during write function. This function is not supported in read-only configuration.