ff_ioman.h
FF_IOManager_t *FF_CreateIOManger( FF_CreationParameters_t *pxParameters, FF_Error_t *pxError );
FreeRTOS-Plus-FAT media drivers
store information that is common to all media types in a structure of
type FF_Disk_t.
The pxIOManager member of the FF_Disk_t structure references an object
called an input/output manager (IO Manager, or simply IOMAN). The IO
manager is responsible for, amongst other things, buffering and caching
both file and directory information.
FF_CreateIOManager() creates an IO Manager object.
Parameters are passed into FF_CreateIOManager() in an FF_CreationParameters_t
structure.
The pvSemaphore member of the FF_CreationParameters_t structure must be
created by a call to the
xSemaphoreCreateRecursiveMutex()
FreeRTOS API function.
typedef struct xFF_CREATION_PARAMETERS
{
uint8_t *pucCacheMemory;
uint32_t ulMemorySize;
BaseType_t ulSectorSize;
FF_WriteBlock_t fnWriteBlocks;
FF_ReadBlock_t fnReadBlocks;
FF_Disk_t *pxDisk;
void *pvSemaphore;
BaseType_t xBlockDeviceIsReentrant;
} FF_CreationParameters_t;
The FF_CreationParameters_t structure
Parameters:
pxParameters
|
A structure of type FF_CreationParameters_t, which
defines the IO manager being created.
|
pxError
|
Used to pass out an error code.
|
Returns:
If the IO manager was created successfully then a pointer to the created
IO manager is returned and *pxError is set to FF_ERR_NONE.
If the IO manager was not created successfully then NULL is returned and
*pxError is set to an error code. FF_GetErrMessage() converts error codes
into error descriptions.
Example usage:
The page that documents
how to create a FreeRTOS-Plus-FAT
media driver also demonstrates how to use the FF_CreateIOManger()
function.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.