You are currently viewing the documentation for:
ECF_GetVolumeInformation returns information about the disk size and sector size of a block device.
ECF_ErrorCode ECF_GetVolumeInformation(
   struct ECF_BlockDriver *pBlockDriver,
   uint16_t *pSectorSize,
   uint32_t *pNumberOfSectors
This is a pointer to the struct ECF_BlockDriver to get volume information from.
This is a pointer to a uint16_t that will be set to the sector size.
This is a pointer to a uint32_t that will be set to the number of sectors.
Return value
Returns one of the EcFAT error codes (ECFERR_SUCCESS on success)
The difference between calling ECF_GetVolumeInformation and calling the block driver's m_fnGetVolumeInformation directly is that ECF_GetVolumeInformation will properly handle wear leveling and locking of the block driver. If the device is wear-leveled, ECF_GetVolumeInformation will return the number of blocks that is actually usable which will be less than the value return by m_fnGetVolumeInformation.
See also