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


[FreeRTOS Embedded File System API]

unsigned char f_close( F_FILE *pxFileHandle );

Closes a file in the embedded FAT file system that was previously opened using a call to f_open().


pxFileHandle   The handle of the file being closed. The file handle is returned from the call to f_open() used to originally open the file.

F_NO_ERROR   The file was closed.

Any other value   The file could not be closed. The return value holds the error code.

See also

f_read(), f_write(), f_open().

Example usage:

void vSampleFunction( void )
F_FILE *pxFile;
char c;

    /* Open a file called afile.bin. */
    pxFile = f_open( "afile.bin", "r" );
    if( pxFile != NULL )
         * Access the file here using f_read().

        /* Close the file when all acceses are complete. */
        f_close( pxFile );
Example use of the f_close() 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.