EFM32 Jade Gecko 12 Software Documentation  efm32jg12-doc-5.1.2
rfs.h
Go to the documentation of this file.
1 /***************************************************************************/
16 #ifndef __RFS_H_
17 #define __RFS_H_
18 
19 #include <stdint.h>
20 
21 /***************************************************************************/
27 /***************************************************************************/
34 /***************************************************************************/
38 typedef struct __RFS_FileHandle {
39 
40  uint16_t fileIndex;
41  uint32_t currentIndex;
43 } RFS_FileHandle;
44 
48 /***************************************************************************/
55 #define RFS_MAX_FILE_NAME_SIZE 256
57 #define RFS_SEEK_SET 0x80000000
58 #define RFS_SEEK_CUR 0x80000001
59 #define RFS_SEEK_END 0x80000002
64 /***************************************************************************/
70 uint32_t RFS_getFileCount( void );
71 uint8_t *RFS_getFileNameByIndex( uint32_t index );
72 int32_t RFS_getFileLengthByIndex( uint32_t index );
73 int16_t RFS_getFileIndex( uint8_t name[] );
74 
75 int32_t RFS_fileOpen( RFS_FileHandle *fileHandle, uint8_t name[] );
76 int32_t RFS_fileSeek( RFS_FileHandle *fileHandle, int32_t offset, uint32_t whence );
77 int32_t RFS_fileRead( uint8_t *buf, uint32_t size, uint32_t nmemb, RFS_FileHandle *fileHandle );
78 int32_t RFS_getFileLength( RFS_FileHandle *fileHandle );
79 uint8_t *RFS_getFileName( RFS_FileHandle *fileHandle );
80 uint8_t *RFS_fileGetRawData( RFS_FileHandle *fileHandle );
81 
90 #endif /* __RFS_H_ */