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