You are currently viewing the documentation for:
ECF_TrimSectorRange
ECF_TrimSectorRange trims a range of sectors on the block device. By trimming sectors, you signal that the sectors are not used and does not need to be stored.
ECF_ErrorCode ECF_TrimSectorRange(
   struct ECF_BlockDriver *pBlockDriver,
   uint32_t startSector,
   uint32_t endSector,
   uint8_t flags
);
Parameters
pBlockDriver
This is a pointer to the struct ECF_BlockDriver to trim sectors information in.
startSector
This specifies the first sector to trim.
endSector
This specifies the last sector to trim.
flags
No flags are defined, pass 0.
Return value
Returns one of the EcFAT error codes (ECFERR_SUCCESS on success)
Remarks
The difference between calling ECF_TrimSectorRange and calling the block driver's m_fnTrimSectorRange directly is that ECF_TrimSectorRange will properly handle wear leveling and locking of the block driver.
See also