]>
Commit | Line | Data |
---|---|---|
4f881b02 | 1 | /*---------------------------------------------------------------------------/ |
b30c4e8f | 2 | / FatFs - FAT file system module configuration file |
4f881b02 | 3 | /---------------------------------------------------------------------------*/ |
7f552300 | 4 | |
b30c4e8f | 5 | #define _FFCONF 68020 /* Revision ID */ |
7f552300 | 6 | |
4f881b02 | 7 | /*---------------------------------------------------------------------------/ |
b30c4e8f | 8 | / Function Configurations |
4f881b02 L |
9 | /---------------------------------------------------------------------------*/ |
10 | ||
4f881b02 L |
11 | #define _FS_READONLY 0 |
12 | /* This option switches read-only configuration. (0:Read/Write or 1:Read-only) | |
b30c4e8f L |
13 | / Read-only configuration removes writing API functions, f_write(), f_sync(), |
14 | / f_unlink(), f_mkdir(), f_chmod(), f_rename(), f_truncate(), f_getfree() | |
15 | / and optional writing functions as well. */ | |
4f881b02 L |
16 | |
17 | ||
18 | #define _FS_MINIMIZE 0 | |
b30c4e8f | 19 | /* This option defines minimization level to remove some basic API functions. |
4f881b02 L |
20 | / |
21 | / 0: All basic functions are enabled. | |
b30c4e8f L |
22 | / 1: f_stat(), f_getfree(), f_unlink(), f_mkdir(), f_truncate() and f_rename() |
23 | / are removed. | |
4f881b02 L |
24 | / 2: f_opendir(), f_readdir() and f_closedir() are removed in addition to 1. |
25 | / 3: f_lseek() function is removed in addition to 2. */ | |
26 | ||
27 | ||
7af9364e | 28 | #define _USE_STRFUNC 2 |
4f881b02 L |
29 | /* This option switches string functions, f_gets(), f_putc(), f_puts() and |
30 | / f_printf(). | |
31 | / | |
32 | / 0: Disable string functions. | |
33 | / 1: Enable without LF-CRLF conversion. | |
34 | / 2: Enable with LF-CRLF conversion. */ | |
35 | ||
36 | ||
b30c4e8f L |
37 | #define _USE_FIND 0 |
38 | /* This option switches filtered directory read functions, f_findfirst() and | |
39 | / f_findnext(). (0:Disable, 1:Enable 2:Enable with matching altname[] too) */ | |
40 | ||
41 | ||
4f881b02 | 42 | #define _USE_MKFS 0 |
b30c4e8f | 43 | /* This option switches f_mkfs() function. (0:Disable or 1:Enable) */ |
4f881b02 L |
44 | |
45 | ||
46 | #define _USE_FASTSEEK 0 | |
b30c4e8f L |
47 | /* This option switches fast seek function. (0:Disable or 1:Enable) */ |
48 | ||
4f881b02 | 49 | |
b30c4e8f L |
50 | #define _USE_EXPAND 0 |
51 | /* This option switches f_expand function. (0:Disable or 1:Enable) */ | |
4f881b02 | 52 | |
b30c4e8f L |
53 | |
54 | #define _USE_CHMOD 0 | |
55 | /* This option switches attribute manipulation functions, f_chmod() and f_utime(). | |
56 | / (0:Disable or 1:Enable) Also _FS_READONLY needs to be 0 to enable this option. */ | |
57 | ||
58 | ||
59 | #define _USE_LABEL 0 | |
4f881b02 L |
60 | /* This option switches volume label functions, f_getlabel() and f_setlabel(). |
61 | / (0:Disable or 1:Enable) */ | |
62 | ||
63 | ||
64 | #define _USE_FORWARD 0 | |
65 | /* This option switches f_forward() function. (0:Disable or 1:Enable) */ | |
4f881b02 L |
66 | |
67 | ||
68 | /*---------------------------------------------------------------------------/ | |
69 | / Locale and Namespace Configurations | |
70 | /---------------------------------------------------------------------------*/ | |
71 | ||
b30c4e8f | 72 | #define _CODE_PAGE 850 |
4f881b02 L |
73 | /* This option specifies the OEM code page to be used on the target system. |
74 | / Incorrect setting of the code page can cause a file open failure. | |
75 | / | |
b30c4e8f L |
76 | / 1 - ASCII (No extended character. Non-LFN cfg. only) |
77 | / 437 - U.S. | |
78 | / 720 - Arabic | |
79 | / 737 - Greek | |
80 | / 771 - KBL | |
81 | / 775 - Baltic | |
82 | / 850 - Latin 1 | |
83 | / 852 - Latin 2 | |
84 | / 855 - Cyrillic | |
85 | / 857 - Turkish | |
86 | / 860 - Portuguese | |
87 | / 861 - Icelandic | |
88 | / 862 - Hebrew | |
89 | / 863 - Canadian French | |
90 | / 864 - Arabic | |
91 | / 865 - Nordic | |
92 | / 866 - Russian | |
93 | / 869 - Greek 2 | |
94 | / 932 - Japanese (DBCS) | |
95 | / 936 - Simplified Chinese (DBCS) | |
96 | / 949 - Korean (DBCS) | |
97 | / 950 - Traditional Chinese (DBCS) | |
98 | */ | |
4f881b02 L |
99 | |
100 | ||
101 | #define _USE_LFN 1 | |
102 | #define _MAX_LFN 128 | |
b30c4e8f | 103 | /* The _USE_LFN switches the support of long file name (LFN). |
4f881b02 | 104 | / |
b30c4e8f | 105 | / 0: Disable support of LFN. _MAX_LFN has no effect. |
4f881b02 L |
106 | / 1: Enable LFN with static working buffer on the BSS. Always NOT thread-safe. |
107 | / 2: Enable LFN with dynamic working buffer on the STACK. | |
108 | / 3: Enable LFN with dynamic working buffer on the HEAP. | |
109 | / | |
b30c4e8f L |
110 | / To enable the LFN, Unicode handling functions (option/unicode.c) must be added |
111 | / to the project. The working buffer occupies (_MAX_LFN + 1) * 2 bytes and | |
112 | / additional 608 bytes at exFAT enabled. _MAX_LFN can be in range from 12 to 255. | |
113 | / It should be set 255 to support full featured LFN operations. | |
4f881b02 L |
114 | / When use stack for the working buffer, take care on stack overflow. When use heap |
115 | / memory for the working buffer, memory management functions, ff_memalloc() and | |
116 | / ff_memfree(), must be added to the project. */ | |
117 | ||
118 | ||
119 | #define _LFN_UNICODE 0 | |
b30c4e8f L |
120 | /* This option switches character encoding on the API. (0:ANSI/OEM or 1:UTF-16) |
121 | / To use Unicode string for the path name, enable LFN and set _LFN_UNICODE = 1. | |
122 | / This option also affects behavior of string I/O functions. */ | |
4f881b02 L |
123 | |
124 | ||
125 | #define _STRF_ENCODE 3 | |
b30c4e8f | 126 | /* When _LFN_UNICODE == 1, this option selects the character encoding ON THE FILE to |
4f881b02 L |
127 | / be read/written via string I/O functions, f_gets(), f_putc(), f_puts and f_printf(). |
128 | / | |
129 | / 0: ANSI/OEM | |
130 | / 1: UTF-16LE | |
131 | / 2: UTF-16BE | |
132 | / 3: UTF-8 | |
133 | / | |
b30c4e8f | 134 | / This option has no effect when _LFN_UNICODE == 0. */ |
4f881b02 L |
135 | |
136 | ||
137 | #define _FS_RPATH 2 | |
b30c4e8f | 138 | /* This option configures support of relative path. |
4f881b02 | 139 | / |
b30c4e8f L |
140 | / 0: Disable relative path and remove related functions. |
141 | / 1: Enable relative path. f_chdir() and f_chdrive() are available. | |
4f881b02 | 142 | / 2: f_getcwd() function is available in addition to 1. |
b30c4e8f | 143 | */ |
4f881b02 L |
144 | |
145 | ||
146 | /*---------------------------------------------------------------------------/ | |
147 | / Drive/Volume Configurations | |
148 | /---------------------------------------------------------------------------*/ | |
149 | ||
150 | #define _VOLUMES 2 | |
151 | /* Number of volumes (logical drives) to be used. */ | |
152 | ||
153 | ||
154 | #define _STR_VOLUME_ID 0 | |
b30c4e8f L |
155 | #define _VOLUME_STRS "RAM","NAND","CF","SD","SD2","USB","USB2","USB3" |
156 | /* _STR_VOLUME_ID switches string support of volume ID. | |
4f881b02 L |
157 | / When _STR_VOLUME_ID is set to 1, also pre-defined strings can be used as drive |
158 | / number in the path name. _VOLUME_STRS defines the drive ID strings for each | |
159 | / logical drives. Number of items must be equal to _VOLUMES. Valid characters for | |
160 | / the drive ID strings are: A-Z and 0-9. */ | |
161 | ||
162 | ||
163 | #define _MULTI_PARTITION 0 | |
b30c4e8f L |
164 | /* This option switches support of multi-partition on a physical drive. |
165 | / By default (0), each logical drive number is bound to the same physical drive | |
166 | / number and only an FAT volume found on the physical drive will be mounted. | |
167 | / When multi-partition is enabled (1), each logical drive number can be bound to | |
168 | / arbitrary physical drive and partition listed in the VolToPart[]. Also f_fdisk() | |
169 | / funciton will be available. */ | |
4f881b02 L |
170 | |
171 | ||
172 | #define _MIN_SS 512 | |
173 | #define _MAX_SS 512 | |
174 | /* These options configure the range of sector size to be supported. (512, 1024, | |
175 | / 2048 or 4096) Always set both 512 for most systems, all type of memory cards and | |
176 | / harddisk. But a larger value may be required for on-board flash memory and some | |
177 | / type of optical media. When _MAX_SS is larger than _MIN_SS, FatFs is configured | |
178 | / to variable sector size and GET_SECTOR_SIZE command must be implemented to the | |
179 | / disk_ioctl() function. */ | |
180 | ||
181 | ||
182 | #define _USE_TRIM 0 | |
b30c4e8f L |
183 | /* This option switches support of ATA-TRIM. (0:Disable or 1:Enable) |
184 | / To enable Trim function, also CTRL_TRIM command should be implemented to the | |
4f881b02 L |
185 | / disk_ioctl() function. */ |
186 | ||
187 | ||
188 | #define _FS_NOFSINFO 0 | |
189 | /* If you need to know correct free space on the FAT32 volume, set bit 0 of this | |
190 | / option, and f_getfree() function at first time after volume mount will force | |
191 | / a full FAT scan. Bit 1 controls the use of last allocated cluster number. | |
192 | / | |
193 | / bit0=0: Use free cluster count in the FSINFO if available. | |
194 | / bit0=1: Do not trust free cluster count in the FSINFO. | |
195 | / bit1=0: Use last allocated cluster number in the FSINFO if available. | |
196 | / bit1=1: Do not trust last allocated cluster number in the FSINFO. | |
197 | */ | |
198 | ||
199 | ||
200 | ||
201 | /*---------------------------------------------------------------------------/ | |
202 | / System Configurations | |
203 | /---------------------------------------------------------------------------*/ | |
204 | ||
b30c4e8f L |
205 | #define _FS_TINY 1 |
206 | /* This option switches tiny buffer configuration. (0:Normal or 1:Tiny) | |
207 | / At the tiny configuration, size of file object (FIL) is reduced _MAX_SS bytes. | |
208 | / Instead of private sector buffer eliminated from the file object, common sector | |
209 | / buffer in the file system object (FATFS) is used for the file data transfer. */ | |
210 | ||
211 | ||
212 | #define _FS_EXFAT 0 | |
213 | /* This option switches support of exFAT file system. (0:Disable or 1:Enable) | |
214 | / When enable exFAT, also LFN needs to be enabled. (_USE_LFN >= 1) | |
215 | / Note that enabling exFAT discards C89 compatibility. */ | |
216 | ||
217 | ||
4f881b02 | 218 | #define _FS_NORTC 0 |
b30c4e8f L |
219 | #define _NORTC_MON 1 |
220 | #define _NORTC_MDAY 1 | |
221 | #define _NORTC_YEAR 2016 | |
222 | /* The option _FS_NORTC switches timestamp functiton. If the system does not have | |
223 | / any RTC function or valid timestamp is not needed, set _FS_NORTC = 1 to disable | |
224 | / the timestamp function. All objects modified by FatFs will have a fixed timestamp | |
225 | / defined by _NORTC_MON, _NORTC_MDAY and _NORTC_YEAR in local time. | |
226 | / To enable timestamp function (_FS_NORTC = 0), get_fattime() function need to be | |
227 | / added to the project to get current time form real-time clock. _NORTC_MON, | |
7af9364e | 228 | / _NORTC_MDAY and _NORTC_YEAR have no effect. |
b30c4e8f | 229 | / These options have no effect at read-only configuration (_FS_READONLY = 1). */ |
4f881b02 L |
230 | |
231 | ||
232 | #define _FS_LOCK 0 | |
b30c4e8f | 233 | /* The option _FS_LOCK switches file lock function to control duplicated file open |
4f881b02 L |
234 | / and illegal operation to open objects. This option must be 0 when _FS_READONLY |
235 | / is 1. | |
236 | / | |
b30c4e8f | 237 | / 0: Disable file lock function. To avoid volume corruption, application program |
4f881b02 | 238 | / should avoid illegal open, remove and rename to the open objects. |
b30c4e8f | 239 | / >0: Enable file lock function. The value defines how many files/sub-directories |
4f881b02 | 240 | / can be opened simultaneously under file lock control. Note that the file |
b30c4e8f | 241 | / lock control is independent of re-entrancy. */ |
4f881b02 L |
242 | |
243 | ||
244 | #define _FS_REENTRANT 0 | |
245 | #define _FS_TIMEOUT 1000 | |
246 | #define _SYNC_t HANDLE | |
b30c4e8f | 247 | /* The option _FS_REENTRANT switches the re-entrancy (thread safe) of the FatFs |
4f881b02 L |
248 | / module itself. Note that regardless of this option, file access to different |
249 | / volume is always re-entrant and volume control functions, f_mount(), f_mkfs() | |
250 | / and f_fdisk() function, are always not re-entrant. Only file/directory access | |
b30c4e8f | 251 | / to the same volume is under control of this function. |
4f881b02 L |
252 | / |
253 | / 0: Disable re-entrancy. _FS_TIMEOUT and _SYNC_t have no effect. | |
254 | / 1: Enable re-entrancy. Also user provided synchronization handlers, | |
255 | / ff_req_grant(), ff_rel_grant(), ff_del_syncobj() and ff_cre_syncobj() | |
256 | / function, must be added to the project. Samples are available in | |
257 | / option/syscall.c. | |
258 | / | |
259 | / The _FS_TIMEOUT defines timeout period in unit of time tick. | |
260 | / The _SYNC_t defines O/S dependent sync object type. e.g. HANDLE, ID, OS_EVENT*, | |
b30c4e8f L |
261 | / SemaphoreHandle_t and etc.. A header file for O/S definitions needs to be |
262 | / included somewhere in the scope of ff.h. */ | |
4f881b02 | 263 | |
b30c4e8f | 264 | /* #include <windows.h> // O/S definitions */ |
4f881b02 | 265 | |
b30c4e8f L |
266 | |
267 | /*--- End of configuration options ---*/ |