BeRTOS
fat.h
Go to the documentation of this file.
00001 
00047 #ifndef FS_FAT_H
00048 #define FS_FAT_H
00049 
00050 #include <io/kfile.h>
00051 #include "fatfs/ff.h"
00052 
00053 typedef struct FatFile
00054 {
00055     KFile fd;
00056     FIL fat_file;
00057     FRESULT error_code;       
00058 } FatFile;
00059 
00060 #define KFT_FATFILE MAKE_ID('F', 'A', 'T', 'F')
00061 
00062 INLINE FatFile * FATFILE_CAST(KFile *fd)
00063 {
00064     ASSERT(fd->_type == KFT_FATFILE);
00065     return (FatFile *)fd;
00066 }
00067 
00081 FRESULT fatfile_open(FatFile *file, const char *file_path, BYTE mode);
00082 
00083 #endif /* FS_FAT_H */
00084