You are currently viewing the documentation for:
m_fnFlush
m_fnFlush is called when EcFAT wants to flush data. It can be supplied by a block driver that caches data to force it to flush its cache.
ECF_ErrorCode m_fnFlush(
   struct ECF_BlockDriver *pBlockDriver
);
Parameters
pBlockDriver
This is a pointer to the struct ECF_BlockDriver that the function is a member of. It can be used by the block driver to access the m_BlockDriverData member or to call the other functions.
Return value
Return ECFERR_SUCCESS.
Remarks
The m_fnFlush an optional function that is part of struct ECF_BlockDriver. If your block device has a cache you need to implement this function. EcFAT will call it when it wants to be sure that all changes are actually written to disc and not just sits in the cache. On both single- and multithreaded systems, EcFAT will make certain that it will not call any of the other block driver functions until this call has been completed so you do not need to implement any locking in the block driver unless it is needed for other purposes.