00001 00008 #ifndef FAT_H 00009 #define FAT_H 00010 00011 #include "buffer.h" 00012 #include "board.h" 00013 00015 #define IS_FAT_32 UDF 00016 00017 Public extern xdata unsigned long fileSize; 00018 00019 00020 00022 #define MAX_NUMBER_FRAGMENTS 10 00023 00025 xdata extern struct fragmentEntry { 00026 unsigned long start; 00027 unsigned long length; 00028 } fragment[MAX_NUMBER_FRAGMENTS]; 00029 00031 xdata extern char currentFileName[12]; 00032 00035 unsigned char InitFileSystem(); 00036 00053 unsigned char OpenFile (unsigned int fileNumber); 00054 00055 00063 unsigned char FGetChar(); 00064 00074 unsigned char BuildFragmentTable(void); 00075 00078 unsigned char ScanForFreeSector(); 00079 00080 00082 extern xdata unsigned long freeSector; 00083 00084 extern data unsigned char fatSectorsPerCluster; 00085 00086 void WriteClusterChain(); 00087 00088 #endif