|
4 | 4 |
|
5 | 5 | #define FFCONF_DEF 89352 /* Revision ID */
|
6 | 6 |
|
7 |
| -#define FFS_DBG 0 |
| 7 | +#define FFS_DBG MBED_CONF_FAT_CHAN_FFS_DBG |
8 | 8 |
|
9 | 9 | /*---------------------------------------------------------------------------/
|
10 | 10 | / Function Configurations
|
11 | 11 | /---------------------------------------------------------------------------*/
|
12 | 12 |
|
13 |
| -#define FF_FS_READONLY 0 |
| 13 | +#define FF_FS_READONLY MBED_CONF_FAT_CHAN_FF_FS_READONLY |
14 | 14 | /* This option switches read-only configuration. (0:Read/Write or 1:Read-only)
|
15 | 15 | / Read-only configuration removes writing API functions, f_write(), f_sync(),
|
16 | 16 | / f_unlink(), f_mkdir(), f_chmod(), f_rename(), f_truncate(), f_getfree()
|
17 | 17 | / and optional writing functions as well. */
|
18 | 18 |
|
19 | 19 |
|
20 |
| -#define FF_FS_MINIMIZE 0 |
| 20 | +#define FF_FS_MINIMIZE MBED_CONF_FAT_CHAN_FF_FS_MINIMIZE |
21 | 21 | /* This option defines minimization level to remove some basic API functions.
|
22 | 22 | /
|
23 | 23 | / 0: Basic functions are fully enabled.
|
|
27 | 27 | / 3: f_lseek() function is removed in addition to 2. */
|
28 | 28 |
|
29 | 29 |
|
30 |
| -#define FF_USE_STRFUNC 0 |
| 30 | +#define FF_USE_STRFUNC MBED_CONF_FAT_CHAN_FF_USE_STRFUNC |
31 | 31 | /* This option switches string functions, f_gets(), f_putc(), f_puts() and f_printf().
|
32 | 32 | /
|
33 | 33 | / 0: Disable string functions.
|
34 | 34 | / 1: Enable without LF-CRLF conversion.
|
35 | 35 | / 2: Enable with LF-CRLF conversion. */
|
36 | 36 |
|
37 | 37 |
|
38 |
| -#define FF_USE_FIND 0 |
| 38 | +#define FF_USE_FIND MBED_CONF_FAT_CHAN_FF_USE_FIND |
39 | 39 | /* This option switches filtered directory read functions, f_findfirst() and
|
40 | 40 | / f_findnext(). (0:Disable, 1:Enable 2:Enable with matching altname[] too) */
|
41 | 41 |
|
42 | 42 |
|
43 |
| -#define FF_USE_MKFS 1 |
| 43 | +#define FF_USE_MKFS MBED_CONF_FAT_CHAN_FF_USE_MKFS |
44 | 44 | /* This option switches f_mkfs() function. (0:Disable or 1:Enable) */
|
45 | 45 |
|
46 | 46 |
|
47 |
| -#define FF_USE_FASTSEEK 0 |
| 47 | +#define FF_USE_FASTSEEK MBED_CONF_FAT_CHAN_FF_USE_FASTSEEK |
48 | 48 | /* This option switches fast seek function. (0:Disable or 1:Enable) */
|
49 | 49 |
|
50 | 50 |
|
51 |
| -#define FF_USE_EXPAND 0 |
| 51 | +#define FF_USE_EXPAND MBED_CONF_FAT_CHAN_FF_USE_EXPAND |
52 | 52 | /* This option switches f_expand function. (0:Disable or 1:Enable) */
|
53 | 53 |
|
54 | 54 |
|
55 |
| -#define FF_USE_CHMOD 0 |
| 55 | +#define FF_USE_CHMOD MBED_CONF_FAT_CHAN_FF_USE_CHMOD |
56 | 56 | /* This option switches attribute manipulation functions, f_chmod() and f_utime().
|
57 | 57 | / (0:Disable or 1:Enable) Also FF_FS_READONLY needs to be 0 to enable this option. */
|
58 | 58 |
|
59 | 59 |
|
60 |
| -#define FF_USE_LABEL 0 |
| 60 | +#define FF_USE_LABEL MBED_CONF_FAT_CHAN_FF_USE_LABEL |
61 | 61 | /* This option switches volume label functions, f_getlabel() and f_setlabel().
|
62 | 62 | / (0:Disable or 1:Enable) */
|
63 | 63 |
|
64 | 64 |
|
65 |
| -#define FF_USE_FORWARD 0 |
| 65 | +#define FF_USE_FORWARD MBED_CONF_FAT_CHAN_FF_USE_FORWARD |
66 | 66 | /* This option switches f_forward() function. (0:Disable or 1:Enable) */
|
67 | 67 |
|
68 | 68 |
|
69 | 69 | /*---------------------------------------------------------------------------/
|
70 | 70 | / Locale and Namespace Configurations
|
71 | 71 | /---------------------------------------------------------------------------*/
|
72 | 72 |
|
73 |
| -#define FF_CODE_PAGE 437 |
| 73 | +#define FF_CODE_PAGE MBED_CONF_FAT_CHAN_FF_CODE_PAGE |
74 | 74 | /* This option specifies the OEM code page to be used on the target system.
|
75 | 75 | / Incorrect code page setting can cause a file open failure.
|
76 | 76 | /
|
|
99 | 99 | */
|
100 | 100 |
|
101 | 101 |
|
102 |
| -#define FF_USE_LFN 3 |
103 |
| -#define FF_MAX_LFN 255 |
| 102 | +#define FF_USE_LFN MBED_CONF_FAT_CHAN_FF_USE_LFN |
| 103 | +#define FF_MAX_LFN MBED_CONF_FAT_CHAN_FF_MAX_LFN |
104 | 104 | /* The FF_USE_LFN switches the support for LFN (long file name).
|
105 | 105 | /
|
106 | 106 | / 0: Disable LFN. FF_MAX_LFN has no effect.
|
|
119 | 119 | / ff_memfree() in ffsystem.c, need to be added to the project. */
|
120 | 120 |
|
121 | 121 |
|
122 |
| -#define FF_LFN_UNICODE 0 |
| 122 | +#define FF_LFN_UNICODE MBED_CONF_FAT_CHAN_FF_LFN_UNICODE |
123 | 123 | /* This option switches the character encoding on the API when LFN is enabled.
|
124 | 124 | /
|
125 | 125 | / 0: ANSI/OEM in current CP (TCHAR = char)
|
|
130 | 130 | / When LFN is not enabled, this option has no effect. */
|
131 | 131 |
|
132 | 132 |
|
133 |
| -#define FF_LFN_BUF 255 |
134 |
| -#define FF_SFN_BUF 12 |
| 133 | +#define FF_LFN_BUF MBED_CONF_FAT_CHAN_FF_LFN_BUF |
| 134 | +#define FF_SFN_BUF MBED_CONF_FAT_CHAN_FF_SFN_BUF |
135 | 135 | /* This set of options defines size of file name members in the FILINFO structure
|
136 | 136 | / which is used to read out directory items. These values should be suffcient for
|
137 | 137 | / the file names to read. The maximum possible length of the read file name depends
|
138 | 138 | / on character encoding. When LFN is not enabled, these options have no effect. */
|
139 | 139 |
|
140 | 140 |
|
141 |
| -#define FF_STRF_ENCODE 3 |
| 141 | +#define FF_STRF_ENCODE MBED_CONF_FAT_CHAN_FF_STRF_ENCODE |
142 | 142 | /* When FF_LFN_UNICODE >= 1 with LFN enabled, string I/O functions, f_gets(),
|
143 | 143 | / f_putc(), f_puts and f_printf() convert the character encoding in it.
|
144 | 144 | / This option selects assumption of character encoding ON THE FILE to be
|
|
151 | 151 | */
|
152 | 152 |
|
153 | 153 |
|
154 |
| -#define FF_FS_RPATH 1 |
| 154 | +#define FF_FS_RPATH MBED_CONF_FAT_CHAN_FF_FS_RPATH |
155 | 155 | /* This option configures support for relative path.
|
156 | 156 | /
|
157 | 157 | / 0: Disable relative path and remove related functions.
|
|
164 | 164 | / Drive/Volume Configurations
|
165 | 165 | /---------------------------------------------------------------------------*/
|
166 | 166 |
|
167 |
| -#define FF_VOLUMES 4 |
| 167 | +#define FF_VOLUMES MBED_CONF_FAT_CHAN_FF_VOLUMES |
168 | 168 | /* Number of volumes (logical drives) to be used. (1-10) */
|
169 | 169 |
|
170 | 170 |
|
171 |
| -#define FF_STR_VOLUME_ID 0 |
172 |
| -#define FF_VOLUME_STRS "RAM","NAND","CF","SD","SD2","USB","USB2","USB3" |
| 171 | +#define FF_STR_VOLUME_ID MBED_CONF_FAT_CHAN_FF_STR_VOLUME_ID |
| 172 | +#define FF_VOLUME_STRS MBED_CONF_FAT_CHAN_FF_VOLUME_STRS |
173 | 173 | /* FF_STR_VOLUME_ID switches string support for volume ID.
|
174 | 174 | / When FF_STR_VOLUME_ID is set to 1, also pre-defined strings can be used as drive
|
175 | 175 | / number in the path name. FF_VOLUME_STRS defines the drive ID strings for each
|
176 | 176 | / logical drives. Number of items must be equal to FF_VOLUMES. Valid characters for
|
177 | 177 | / the drive ID strings are: A-Z and 0-9. */
|
178 | 178 |
|
179 | 179 |
|
180 |
| -#define FF_MULTI_PARTITION 0 |
| 180 | +#define FF_MULTI_PARTITION MBED_CONF_FAT_CHAN_FF_MULTI_PARTITION |
181 | 181 | /* This option switches support for multiple volumes on the physical drive.
|
182 | 182 | / By default (0), each logical drive number is bound to the same physical drive
|
183 | 183 | / number and only an FAT volume found on the physical drive will be mounted.
|
|
186 | 186 | / funciton will be available. */
|
187 | 187 |
|
188 | 188 |
|
189 |
| -#define FF_MIN_SS 512 |
190 |
| -#define FF_MAX_SS 4096 |
| 189 | +#define FF_MIN_SS MBED_CONF_FAT_CHAN_FF_MIN_SS |
| 190 | +#define FF_MAX_SS MBED_CONF_FAT_CHAN_FF_MAX_SS |
191 | 191 | /* This set of options configures the range of sector size to be supported. (512,
|
192 | 192 | / 1024, 2048 or 4096) Always set both 512 for most systems, generic memory card and
|
193 | 193 | / harddisk. But a larger value may be required for on-board flash memory and some
|
|
196 | 196 | / GET_SECTOR_SIZE command. */
|
197 | 197 |
|
198 | 198 |
|
199 |
| -#define FF_USE_TRIM 1 |
| 199 | +#define FF_USE_TRIM MBED_CONF_FAT_CHAN_FF_USE_TRIM |
200 | 200 | /* This option switches support for ATA-TRIM. (0:Disable or 1:Enable)
|
201 | 201 | / To enable Trim function, also CTRL_TRIM command should be implemented to the
|
202 | 202 | / disk_ioctl() function. */
|
203 | 203 |
|
204 | 204 |
|
205 |
| -#define FF_FS_NOFSINFO 0 |
| 205 | +#define FF_FS_NOFSINFO MBED_CONF_FAT_CHAN_FF_FS_NOFSINFO |
206 | 206 | /* If you need to know correct free space on the FAT32 volume, set bit 0 of this
|
207 | 207 | / option, and f_getfree() function at first time after volume mount will force
|
208 | 208 | / a full FAT scan. Bit 1 controls the use of last allocated cluster number.
|
|
219 | 219 | / System Configurations
|
220 | 220 | /---------------------------------------------------------------------------*/
|
221 | 221 |
|
222 |
| -#define FF_FS_TINY 1 |
| 222 | +#define FF_FS_TINY MBED_CONF_FAT_CHAN_FF_FS_TINY |
223 | 223 | /* This option switches tiny buffer configuration. (0:Normal or 1:Tiny)
|
224 | 224 | / At the tiny configuration, size of file object (FIL) is shrinked FF_MAX_SS bytes.
|
225 | 225 | / Instead of private sector buffer eliminated from the file object, common sector
|
226 | 226 | / buffer in the filesystem object (FATFS) is used for the file data transfer. */
|
227 | 227 |
|
228 | 228 |
|
229 |
| -#define FF_FS_EXFAT 0 |
| 229 | +#define FF_FS_EXFAT MBED_CONF_FAT_CHAN_FF_FS_EXFAT |
230 | 230 | /* This option switches support for exFAT filesystem. (0:Disable or 1:Enable)
|
231 | 231 | / When enable exFAT, also LFN needs to be enabled.
|
232 | 232 | / Note that enabling exFAT discards ANSI C (C89) compatibility. */
|
233 | 233 |
|
234 | 234 |
|
235 |
| -#define FF_FS_HEAPBUF 1 |
| 235 | +#define FF_FS_HEAPBUF MBED_CONF_FAT_CHAN_FF_FS_HEAPBUF |
236 | 236 | /* This option enables the use of the heap for allocating buffers. Otherwise
|
237 | 237 | / _MAX_SS sized buffers are allocated statically in relevant structures (in
|
238 | 238 | / FATFS if _FS_TINY, otherwise in FATFS and FIL)
|
239 | 239 | / This option allows the filesystem to dynamically allocate the buffers based
|
240 | 240 | / on underlying sector size. */
|
241 | 241 |
|
242 | 242 |
|
243 |
| -#define FF_FS_NORTC 0 |
244 |
| -#define FF_NORTC_MON 1 |
245 |
| -#define FF_NORTC_MDAY 1 |
246 |
| -#define FF_NORTC_YEAR 2017 |
| 243 | +#define FF_FS_NORTC MBED_CONF_FAT_CHAN_FF_FS_NORTC |
| 244 | +#define FF_NORTC_MON MBED_CONF_FAT_CHAN_FF_NORTC_MON |
| 245 | +#define FF_NORTC_MDAY MBED_CONF_FAT_CHAN_FF_NORTC_MDAY |
| 246 | +#define FF_NORTC_YEAR MBED_CONF_FAT_CHAN_FF_NORTC_YEAR |
247 | 247 | /* The option FF_FS_NORTC switches timestamp functiton. If the system does not have
|
248 | 248 | / any RTC function or valid timestamp is not needed, set FF_FS_NORTC = 1 to disable
|
249 | 249 | / the timestamp function. All objects modified by FatFs will have a fixed timestamp
|
|
254 | 254 | / These options have no effect at read-only configuration (FF_FS_READONLY = 1). */
|
255 | 255 |
|
256 | 256 |
|
257 |
| -#define FF_FS_LOCK 0 |
| 257 | +#define FF_FS_LOCK MBED_CONF_FAT_CHAN_FF_FS_LOCK |
258 | 258 | /* The option FF_FS_LOCK switches file lock function to control duplicated file open
|
259 | 259 | / and illegal operation to open objects. This option must be 0 when FF_FS_READONLY
|
260 | 260 | / is 1.
|
|
266 | 266 | / lock control is independent of re-entrancy. */
|
267 | 267 |
|
268 | 268 |
|
269 |
| -#define FF_FS_REENTRANT 0 |
270 |
| -#define FF_FS_TIMEOUT 1000 |
271 |
| -#define FF_SYNC_t HANDLE |
| 269 | +#define FF_FS_REENTRANT MBED_CONF_FAT_CHAN_FF_FS_REENTRANT |
| 270 | +#define FF_FS_TIMEOUT MBED_CONF_FAT_CHAN_FF_FS_TIMEOUT |
| 271 | +#define FF_SYNC_t MBED_CONF_FAT_CHAN_FF_SYNC_t |
272 | 272 | /* The option FF_FS_REENTRANT switches the re-entrancy (thread safe) of the FatFs
|
273 | 273 | / module itself. Note that regardless of this option, file access to different
|
274 | 274 | / volume is always re-entrant and volume control functions, f_mount(), f_mkfs()
|
|
288 | 288 |
|
289 | 289 | /* #include <windows.h> // O/S definitions */
|
290 | 290 |
|
291 |
| -#define FLUSH_ON_NEW_CLUSTER 0 /* Sync the file on every new cluster */ |
292 |
| -#define FLUSH_ON_NEW_SECTOR 1 /* Sync the file on every new sector */ |
| 291 | +#define FLUSH_ON_NEW_CLUSTER MBED_CONF_FAT_CHAN_FLUSH_ON_NEW_CLUSTER /* Sync the file on every new cluster */ |
| 292 | +#define FLUSH_ON_NEW_SECTOR MBED_CONF_FAT_CHAN_FLUSH_ON_NEW_SECTOR /* Sync the file on every new sector */ |
293 | 293 | /* Only one of these two defines needs to be set to 1. If both are set to 0
|
294 | 294 | the file is only sync when closed.
|
295 | 295 | Clusters are group of sectors (eg: 8 sectors). Flushing on new cluster means
|
|
0 commit comments