Download FreeRTOS
 

Quality RTOS & Embedded Software

LIBRARIES
WHAT'S NEW
Simplifying Authenticated Cloud Connectivity for Any Device.
Designing an energy efficient and cloud-connected IoT solution with CoAP.
Introducing FreeRTOS Kernel version 11.0.0:
FreeRTOS Roadmap and Code Contribution process.
OPC-UA over TSN with FreeRTOS.

ff_fclose()

[FreeRTOS-Plus-FAT Standard API Reference]

ff_stdio.h
int ff_fclose( FF_FILE *pxStream );;
		

Flushes then closes a file within the embedded FAT file system. The file must have previously been opened using ff_fopen().

Parameters:

pxStream   A pointer to the file being closed. This will be the same pointer returned by ff_fopen() when the file was originally opened.

Returns:

If the file was closed successfully then 0 is returned.

If the file could not be closed then -1 is returned and the task's errno is set to indicate the reason. A task can obtain its errno value using the stdioGET_ERRNO API function.

Example usage:

The example provided on the ff_fopen() documentation page shows how ff_fclose() is used.


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.