UINT32 m2m_fs_write(M2M_T_FS_HANDLE filehandle, CHAR *data, UINT32 length)
Description: the function writes data into a file opened in suitable mode, refer to m2m_fs_open(...).
Parameters:
filehandle:
file handle
data:
pointer to the allocated buffer containing the characters to be written in the
file starting
from the current file data pointer.
length: number of characters to be written. If two consecutive writings are performed, the last
one starts from the file data pointer left by the first writing plus 1.
Return
value:
on
success: the number of characters written is equal to length value.
on
failure: if the number of character written is less than
the length value, an
error could be happened. In this case, call the m2m_fs_last_error(...) API.
NOTE: m2m_fs_last_error function returns the failure reason.