Populate a structure with the following information about the embedded
FAT file system drive.
Total drive space.
Free space remaining.
Unusable (bad) size.
A pointer to an F_SPACE structure.
The F_SPACE structure was populated.
Any other value.
The F_SPACE structure was not populated. The returned
value holds the error code.
void vDriveInfo( void )
unsigned char ucReturned;
/* Get space information on current embedded FAT file system drive. */
ucReturned = f_getfreespace( &xSpace );
if( ucReturned != F_NO_ERROR )
/* xSpace.total holds the total drive size, xSpace.free holds the
free space on the drive, xSpace.used holds the size of the used space
on the drive, xSpace.bad holds the size of unusable space on the
/* xSpace could not be completed. ucReturned holds the error code. */