Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Homepage FreeRTOS+ Products FreeRTOS Labs Integration Services Contact / Enquiries

f_getfreespace()

[FreeRTOS Embedded File System API]

header_file.h
unsigned char f_getfreespace ( F_SPACE *pxSpace );
		

Populate a structure with the following information about the embedded FAT file system drive.

  • Total drive space.
  • Free space remaining.
  • Used space.
  • Unusable (bad) size.

Parameters:

pxSpace   A pointer to an F_SPACE structure.

Returns:
F_NO_ERROR   The F_SPACE structure was populated.

Any other value.   The F_SPACE structure was not populated. The returned value holds the error code.

Example usage:


void vDriveInfo( void )
{
F_SPACE xSpace;
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
        drive. */
    }
    else
    {
        /* xSpace could not be completed.  ucReturned holds the error code. */
    }
}
						
Example use of the f_getfreespace API function


[ Back to the top ]    [ About FreeRTOS ]    [ FreeRTOS+ Sitemap ]    [ Main FreeRTOS Sitemap ]    [ ]


Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.