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.

Formatting a Partition
Creating a FreeRTOS-Plus-FAT Media Driver

A media partition must be formatted before it can be used. The FF_Format() function is used for this purpose.

As an example, below is the outline of the prvFormatPartition() function used by FreeRTOS-Plus-FAT's RAM disk driver. prvFormatPartition() is called by the RAM disk's initialisation function and demonstrates how to use the FF_Format() function. See the file ff_ramdisk.c in the FreeRTOS-Plus/Source/FreeRTOS-Plus-FAT/portable/common directory for the full version.


static BaseType_t prvFormatPartition( FF_Disk_t *pxDisk, BaseType_t xPartitionToFormat )
{
BaseType_t xReturn;
FF_Error_t xError;

/* Format the disk, trying FAT16 with small clusters. */
xError = FF_Format( pxDisk->pxIOManager, xPartitionToFormat, pdTRUE, pdTRUE );
if( FF_isERR( xError ) != pdFALSE )
{
xReturn = pdFAIL;
}
else
{
xReturn = pdPASS;
}

return xReturn;
}

Formatting a Partition








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