18 #ifndef __BRP_BALTECH_API_CMDS_FLASHFS_H__    19 #define __BRP_BALTECH_API_CMDS_FLASHFS_H__    20 #include "../typedefs.h"    24 #define BRP_FlashFS_ErrFsCorrupt BRP_ERR_STATUS(0x4900, 0x01)    28 #define BRP_FlashFS_ErrRecordCorrupt BRP_ERR_STATUS(0x4900, 0x02)    32 #define BRP_FlashFS_ErrFlashAccess BRP_ERR_STATUS(0x4900, 0x03)    36 #define BRP_FlashFS_ErrDirectoryFull BRP_ERR_STATUS(0x4900, 0x04)    40 #define BRP_FlashFS_ErrFileNotFound BRP_ERR_STATUS(0x4900, 0x05)    44 #define BRP_FlashFS_ErrEndOfFile BRP_ERR_STATUS(0x4900, 0x06)    48 #define BRP_FlashFS_ErrFull BRP_ERR_STATUS(0x4900, 0x07)    52 #define BRP_FlashFS_ErrFileExist BRP_ERR_STATUS(0x4900, 0x08) brp_errcode brp_FlashFS_CreateFile(brp_protocol protocol, unsigned FileId, unsigned RecordSize)
This command creates a new empty file, if the file doesn't exist yet. 
 
unsigned int brp_errcode
This type is used library-wide for passing error codes in the return value of functions. 
 
brp_errcode brp_FlashFS_GetMemoryInfo(brp_protocol protocol, unsigned *TotalMem, unsigned *FreeMem)
This command checks the consistency of the file system and retrieves information about the available ...
 
struct brp_protocol_t * brp_protocol
This is a generic handle of a protocol. 
 
brp_errcode brp_FlashFS_GetRecordSize(brp_protocol protocol, unsigned FileId, unsigned *RecordSize)
This command retrieves the size of a single record of a certain file. 
 
struct brp_mempool_object_t * brp_mempool
mempool handle. 
 
brp_errcode brp_FlashFS_WriteRecords(brp_protocol protocol, unsigned FileId, unsigned StartRecord, brp_FlashFS_WriteRecords_RecordList_Entry *RecordList, size_t RecordList_len)
This command writes one or more records to a file. 
 
brp_errcode brp_FlashFS_DeleteFile(brp_protocol protocol, unsigned FileId)
This command deletes a file and all its contained records. 
 
brp_errcode brp_FlashFS_GetFileSize(brp_protocol protocol, unsigned FileId, unsigned *FileSize)
This command retrieves the number of records a certain file contains. 
 
brp_errcode brp_FlashFS_RenameFile(brp_protocol protocol, unsigned FileId, unsigned NewFileId)
This command changes the File ID of a file from FileId to NewFileId , provided the file with ID FileI...
 
brp_errcode brp_FlashFS_ReadRecords(brp_protocol protocol, unsigned FileId, unsigned StartRecord, unsigned RecordCount, brp_FlashFS_ReadRecords_RecordList_Entry **RecordList, size_t *RecordList_len, brp_mempool *mempool)
This command reads one or more records from a file. 
 
brp_errcode brp_FlashFS_Format(brp_protocol protocol, bool QuickFormat)
This command resets the complete file system.