You are currently viewing the documentation for:
ECF_WriteFile
ECF_WriteFile writes data to an open file.
ECF_ErrorCode ECF_WriteFile(
   struct ECF_FileHandle *pFileHandle,
   const uint8_t *pData,
   uint32_t bytesToWrite
);
Parameters
pFileHandle
A pointer to an open file handle.
pData
A pointer to a buffer that holds the data to be written.
bytesToWrite
The number of bytes to write.
Return value
Returns one of the EcFAT error codes (ECFERR_SUCCESS on success)
Remarks
If you attempt to write past the end of the file, the file will be extended to hold all the written data.
Example Code
See example for ECF_ReadFile.
See also