00001 /*---------------------------------------------------------------------------/ 00002 / FatFs - FAT file system module configuration file R0.07e (C)ChaN, 2009 00003 /----------------------------------------------------------------------------/ 00004 / 00005 / CAUTION! Do not forget to make clean the project after any changes to 00006 / the configuration options. 00007 / 00008 /----------------------------------------------------------------------------*/ 00009 #ifndef _FFCONFIG 00010 #define _FFCONFIG 0x007E 00011 00012 #ifndef U32 00013 typedef unsigned long U32; 00014 #endif 00015 00016 00017 /*---------------------------------------------------------------------------/ 00018 / Function and Buffer Configurations 00019 /----------------------------------------------------------------------------*/ 00020 00021 #define _FS_TINY 0 /* 0 or 1 */ 00022 /* When _FS_TINY is set to 1, FatFs uses the sector buffer in the file system 00023 / object instead of the sector buffer in the individual file object for file 00024 / data transfer. This reduces memory consumption 512 bytes each file object. */ 00025 00026 00027 #define _FS_READONLY 0 /* 0 or 1 */ 00028 /* Setting _FS_READONLY to 1 defines read only configuration. This removes 00029 / writing functions, f_write, f_sync, f_unlink, f_mkdir, f_chmod, f_rename, 00030 / f_truncate and useless f_getfree. */ 00031 00032 00033 #define _FS_MINIMIZE 1 //0 original /* 0, 1, 2 or 3 */ 00034 /* The _FS_MINIMIZE option defines minimization level to remove some functions. 00035 / 00036 / 0: Full function. 00037 / 1: f_stat, f_getfree, f_unlink, f_mkdir, f_chmod, f_truncate and f_rename 00038 / are removed. 00039 / 2: f_opendir and f_readdir are removed in addition to level 1. 00040 / 3: f_lseek is removed in addition to level 2. */ 00041 00042 00043 #define _USE_STRFUNC 0 /* 0, 1 or 2 */ 00044 /* To enable string functions, set _USE_STRFUNC to 1 or 2. */ 00045 00046 00047 #define _USE_MKFS 0 /* 0 or 1 */ 00048 /* To enable f_mkfs function, set _USE_MKFS to 1 and set _FS_READONLY to 0 */ 00049 00050 00051 #define _USE_FORWARD 0 /* 0 or 1 */ 00052 /* To enable f_forward function, set _USE_FORWARD to 1 and set _FS_TINY to 1. */ 00053 00054 00055 00056 /*---------------------------------------------------------------------------/ 00057 / Locale and Namespace Configurations 00058 /----------------------------------------------------------------------------*/ 00059 00060 #define _CODE_PAGE 1252 00061 //#define _CODE_PAGE 932 00062 /* The _CODE_PAGE specifies the OEM code page to be used on the target system. 00063 / Incorrect setting of the code page can cause a file open failure. 00064 / 00065 / 932 - Japanese Shift-JIS (DBCS, OEM, Windows) 00066 / 936 - Simplified Chinese GBK (DBCS, OEM, Windows) 00067 / 949 - Korean (DBCS, OEM, Windows) 00068 / 950 - Traditional Chinese Big5 (DBCS, OEM, Windows) 00069 / 1250 - Central Europe (Windows) 00070 / 1251 - Cyrillic (Windows) 00071 / 1252 - Latin 1 (Windows) 00072 / 1253 - Greek (Windows) 00073 / 1254 - Turkish (Windows) 00074 / 1255 - Hebrew (Windows) 00075 / 1256 - Arabic (Windows) 00076 / 1257 - Baltic (Windows) 00077 / 1258 - Vietnam (OEM, Windows) 00078 / 437 - U.S. (OEM) 00079 / 720 - Arabic (OEM) 00080 / 737 - Greek (OEM) 00081 / 775 - Baltic (OEM) 00082 / 850 - Multilingual Latin 1 (OEM) 00083 / 858 - Multilingual Latin 1 + Euro (OEM) 00084 / 852 - Latin 2 (OEM) 00085 / 855 - Cyrillic (OEM) 00086 / 866 - Russian (OEM) 00087 / 857 - Turkish (OEM) 00088 / 862 - Hebrew (OEM) 00089 / 874 - Thai (OEM, Windows) 00090 / 1 - ASCII only (Valid for non LFN cfg.) 00091 */ 00092 00093 00094 #define _USE_LFN 0 /* 0, 1 or 2 */ 00095 #define _MAX_LFN 255 /* Maximum LFN length to handle (12 to 255) */ 00096 /* The _USE_LFN option switches the LFN support. 00097 / 00098 / 0: Disable LFN. _MAX_LFN and _LFN_UNICODE have no effect. 00099 / 1: Enable LFN with static working buffer on the bss. NOT REENTRANT. 00100 / 2: Enable LFN with dynamic working buffer on the STACK. 00101 / 00102 / The LFN working buffer occupies (_MAX_LFN + 1) * 2 bytes. When enable LFN, 00103 / two Unicode handling functions ff_convert() and ff_wtoupper() must be added 00104 / to the project. */ 00105 00106 00107 #define _LFN_UNICODE 0 /* 0 or 1 */ 00108 /* To switch the character code set on FatFs API to Unicode, 00109 / enable LFN feature and set _LFN_UNICODE to 1. 00110 */ 00111 00112 00113 #define _FS_RPATH 0 /* 0 or 1 */ 00114 /* When _FS_RPATH is set to 1, relative path feature is enabled and f_chdir, 00115 / f_chdrive function are available. 00116 / Note that output of the f_readdir function is affected by this option. */ 00117 00118 00119 00120 /*---------------------------------------------------------------------------/ 00121 / Physical Drive Configurations 00122 /----------------------------------------------------------------------------*/ 00123 00124 #define _DRIVES 1 00125 /* Number of volumes (logical drives) to be used. */ 00126 00127 00128 #define _MAX_SS 512 /* 512, 1024, 2048 or 4096 */ 00129 /* Maximum sector size to be handled. 00130 / Always set 512 for memory card and hard disk but a larger value may be 00131 / required for floppy disk (512/1024) and optical disk (512/2048). 00132 / When _MAX_SS is larger than 512, GET_SECTOR_SIZE command must be implememted 00133 / to the disk_ioctl function. */ 00134 00135 00136 #define _MULTI_PARTITION 0 /* 0 or 1 */ 00137 /* When _MULTI_PARTITION is set to 0, each volume is bound to the same physical 00138 / drive number and can mount only first primaly partition. When it is set to 1, 00139 / each volume is tied to the partitions listed in Drives[]. */ 00140 00141 00142 00143 /*---------------------------------------------------------------------------/ 00144 / System Configurations 00145 /----------------------------------------------------------------------------*/ 00146 00147 #define _WORD_ACCESS 0 /* 0 or 1 */ 00148 /* The _WORD_ACCESS option defines which access method is used to the word 00149 / data on the FAT volume. 00150 / 00151 / 0: Byte-by-byte access. Always compatible with all platforms. 00152 / 1: Word access. Do not choose this unless following condition is met. 00153 / 00154 / When the byte order on the memory is big-endian or address miss-aligned 00155 / word access results incorrect behavior, the _WORD_ACCESS must be set to 0. 00156 / If it is not the case, the value can also be set to 1 to improve the 00157 / performance and code size. */ 00158 00159 00160 #define _FS_REENTRANT 0 /* 0 or 1 */ 00161 #define _FS_TIMEOUT 1000 /* Timeout period in unit of time ticks */ 00162 #define _SYNC_t HANDLE /* O/S dependent type of sync object. e.g. HANDLE, OS_EVENT*, ID and etc.. */ 00163 /* The _FS_REENTRANT option switches the reentrancy of the FatFs module. 00164 / 00165 / 0: Disable reentrancy. _SYNC_t and _FS_TIMEOUT have no effect. 00166 / 1: Enable reentrancy. Also user provided synchronization handlers, 00167 / ff_req_grant, ff_rel_grant, ff_del_syncobj and ff_cre_syncobj 00168 / function must be added to the project. */ 00169 00170 00171 #endif /* _FFCONFIG */