Finished V1
Dependencies: mbed wave_player 4DGL-uLCD-SE MMA8452
SDFileSystem/FATFileSystem/ChaN/ffconf.h@5:2fb023cdc666, 2019-11-24 (annotated)
- Committer:
- trich9
- Date:
- Sun Nov 24 03:22:35 2019 +0000
- Revision:
- 5:2fb023cdc666
- Parent:
- 0:35660d7952f7
finished V1
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
rconnorlawson | 0:35660d7952f7 | 1 | /*---------------------------------------------------------------------------/ |
rconnorlawson | 0:35660d7952f7 | 2 | / FatFs - FAT file system module configuration file R0.09a (C)ChaN, 2012 |
rconnorlawson | 0:35660d7952f7 | 3 | /----------------------------------------------------------------------------/ |
rconnorlawson | 0:35660d7952f7 | 4 | / |
rconnorlawson | 0:35660d7952f7 | 5 | / CAUTION! Do not forget to make clean the project after any changes to |
rconnorlawson | 0:35660d7952f7 | 6 | / the configuration options. |
rconnorlawson | 0:35660d7952f7 | 7 | / |
rconnorlawson | 0:35660d7952f7 | 8 | /----------------------------------------------------------------------------*/ |
rconnorlawson | 0:35660d7952f7 | 9 | #ifndef _FFCONF |
rconnorlawson | 0:35660d7952f7 | 10 | #define _FFCONF 4004 /* Revision ID */ |
rconnorlawson | 0:35660d7952f7 | 11 | |
rconnorlawson | 0:35660d7952f7 | 12 | #define FFS_DBG 0 |
rconnorlawson | 0:35660d7952f7 | 13 | |
rconnorlawson | 0:35660d7952f7 | 14 | /*---------------------------------------------------------------------------/ |
rconnorlawson | 0:35660d7952f7 | 15 | / Functions and Buffer Configurations |
rconnorlawson | 0:35660d7952f7 | 16 | /----------------------------------------------------------------------------*/ |
rconnorlawson | 0:35660d7952f7 | 17 | |
rconnorlawson | 0:35660d7952f7 | 18 | #define _FS_TINY 0 /* 0:Normal or 1:Tiny */ |
rconnorlawson | 0:35660d7952f7 | 19 | /* When _FS_TINY is set to 1, FatFs uses the sector buffer in the file system |
rconnorlawson | 0:35660d7952f7 | 20 | / object instead of the sector buffer in the individual file object for file |
rconnorlawson | 0:35660d7952f7 | 21 | / data transfer. This reduces memory consumption 512 bytes each file object. */ |
rconnorlawson | 0:35660d7952f7 | 22 | |
rconnorlawson | 0:35660d7952f7 | 23 | |
rconnorlawson | 0:35660d7952f7 | 24 | #define _FS_READONLY 0 /* 0:Read/Write or 1:Read only */ |
rconnorlawson | 0:35660d7952f7 | 25 | /* Setting _FS_READONLY to 1 defines read only configuration. This removes |
rconnorlawson | 0:35660d7952f7 | 26 | / writing functions, f_write, f_sync, f_unlink, f_mkdir, f_chmod, f_rename, |
rconnorlawson | 0:35660d7952f7 | 27 | / f_truncate and useless f_getfree. */ |
rconnorlawson | 0:35660d7952f7 | 28 | |
rconnorlawson | 0:35660d7952f7 | 29 | |
rconnorlawson | 0:35660d7952f7 | 30 | #define _FS_MINIMIZE 0 /* 0 to 3 */ |
rconnorlawson | 0:35660d7952f7 | 31 | /* The _FS_MINIMIZE option defines minimization level to remove some functions. |
rconnorlawson | 0:35660d7952f7 | 32 | / |
rconnorlawson | 0:35660d7952f7 | 33 | / 0: Full function. |
rconnorlawson | 0:35660d7952f7 | 34 | / 1: f_stat, f_getfree, f_unlink, f_mkdir, f_chmod, f_truncate and f_rename |
rconnorlawson | 0:35660d7952f7 | 35 | / are removed. |
rconnorlawson | 0:35660d7952f7 | 36 | / 2: f_opendir and f_readdir are removed in addition to 1. |
rconnorlawson | 0:35660d7952f7 | 37 | / 3: f_lseek is removed in addition to 2. */ |
rconnorlawson | 0:35660d7952f7 | 38 | |
rconnorlawson | 0:35660d7952f7 | 39 | |
rconnorlawson | 0:35660d7952f7 | 40 | #define _USE_STRFUNC 0 /* 0:Disable or 1-2:Enable */ |
rconnorlawson | 0:35660d7952f7 | 41 | /* To enable string functions, set _USE_STRFUNC to 1 or 2. */ |
rconnorlawson | 0:35660d7952f7 | 42 | |
rconnorlawson | 0:35660d7952f7 | 43 | |
rconnorlawson | 0:35660d7952f7 | 44 | #define _USE_MKFS 1 /* 0:Disable or 1:Enable */ |
rconnorlawson | 0:35660d7952f7 | 45 | /* To enable f_mkfs function, set _USE_MKFS to 1 and set _FS_READONLY to 0 */ |
rconnorlawson | 0:35660d7952f7 | 46 | |
rconnorlawson | 0:35660d7952f7 | 47 | |
rconnorlawson | 0:35660d7952f7 | 48 | #define _USE_FORWARD 0 /* 0:Disable or 1:Enable */ |
rconnorlawson | 0:35660d7952f7 | 49 | /* To enable f_forward function, set _USE_FORWARD to 1 and set _FS_TINY to 1. */ |
rconnorlawson | 0:35660d7952f7 | 50 | |
rconnorlawson | 0:35660d7952f7 | 51 | |
rconnorlawson | 0:35660d7952f7 | 52 | #define _USE_FASTSEEK 0 /* 0:Disable or 1:Enable */ |
rconnorlawson | 0:35660d7952f7 | 53 | /* To enable fast seek feature, set _USE_FASTSEEK to 1. */ |
rconnorlawson | 0:35660d7952f7 | 54 | |
rconnorlawson | 0:35660d7952f7 | 55 | |
rconnorlawson | 0:35660d7952f7 | 56 | |
rconnorlawson | 0:35660d7952f7 | 57 | /*---------------------------------------------------------------------------/ |
rconnorlawson | 0:35660d7952f7 | 58 | / Locale and Namespace Configurations |
rconnorlawson | 0:35660d7952f7 | 59 | /----------------------------------------------------------------------------*/ |
rconnorlawson | 0:35660d7952f7 | 60 | |
rconnorlawson | 0:35660d7952f7 | 61 | #define _CODE_PAGE 858 |
rconnorlawson | 0:35660d7952f7 | 62 | /* The _CODE_PAGE specifies the OEM code page to be used on the target system. |
rconnorlawson | 0:35660d7952f7 | 63 | / Incorrect setting of the code page can cause a file open failure. |
rconnorlawson | 0:35660d7952f7 | 64 | / |
rconnorlawson | 0:35660d7952f7 | 65 | / 932 - Japanese Shift-JIS (DBCS, OEM, Windows) |
rconnorlawson | 0:35660d7952f7 | 66 | / 936 - Simplified Chinese GBK (DBCS, OEM, Windows) |
rconnorlawson | 0:35660d7952f7 | 67 | / 949 - Korean (DBCS, OEM, Windows) |
rconnorlawson | 0:35660d7952f7 | 68 | / 950 - Traditional Chinese Big5 (DBCS, OEM, Windows) |
rconnorlawson | 0:35660d7952f7 | 69 | / 1250 - Central Europe (Windows) |
rconnorlawson | 0:35660d7952f7 | 70 | / 1251 - Cyrillic (Windows) |
rconnorlawson | 0:35660d7952f7 | 71 | / 1252 - Latin 1 (Windows) |
rconnorlawson | 0:35660d7952f7 | 72 | / 1253 - Greek (Windows) |
rconnorlawson | 0:35660d7952f7 | 73 | / 1254 - Turkish (Windows) |
rconnorlawson | 0:35660d7952f7 | 74 | / 1255 - Hebrew (Windows) |
rconnorlawson | 0:35660d7952f7 | 75 | / 1256 - Arabic (Windows) |
rconnorlawson | 0:35660d7952f7 | 76 | / 1257 - Baltic (Windows) |
rconnorlawson | 0:35660d7952f7 | 77 | / 1258 - Vietnam (OEM, Windows) |
rconnorlawson | 0:35660d7952f7 | 78 | / 437 - U.S. (OEM) |
rconnorlawson | 0:35660d7952f7 | 79 | / 720 - Arabic (OEM) |
rconnorlawson | 0:35660d7952f7 | 80 | / 737 - Greek (OEM) |
rconnorlawson | 0:35660d7952f7 | 81 | / 775 - Baltic (OEM) |
rconnorlawson | 0:35660d7952f7 | 82 | / 850 - Multilingual Latin 1 (OEM) |
rconnorlawson | 0:35660d7952f7 | 83 | / 858 - Multilingual Latin 1 + Euro (OEM) |
rconnorlawson | 0:35660d7952f7 | 84 | / 852 - Latin 2 (OEM) |
rconnorlawson | 0:35660d7952f7 | 85 | / 855 - Cyrillic (OEM) |
rconnorlawson | 0:35660d7952f7 | 86 | / 866 - Russian (OEM) |
rconnorlawson | 0:35660d7952f7 | 87 | / 857 - Turkish (OEM) |
rconnorlawson | 0:35660d7952f7 | 88 | / 862 - Hebrew (OEM) |
rconnorlawson | 0:35660d7952f7 | 89 | / 874 - Thai (OEM, Windows) |
rconnorlawson | 0:35660d7952f7 | 90 | / 1 - ASCII only (Valid for non LFN cfg.) |
rconnorlawson | 0:35660d7952f7 | 91 | */ |
rconnorlawson | 0:35660d7952f7 | 92 | |
rconnorlawson | 0:35660d7952f7 | 93 | |
rconnorlawson | 0:35660d7952f7 | 94 | #define _USE_LFN 1 /* 0 to 3 */ |
rconnorlawson | 0:35660d7952f7 | 95 | #define _MAX_LFN 255 /* Maximum LFN length to handle (12 to 255) */ |
rconnorlawson | 0:35660d7952f7 | 96 | /* The _USE_LFN option switches the LFN support. |
rconnorlawson | 0:35660d7952f7 | 97 | / |
rconnorlawson | 0:35660d7952f7 | 98 | / 0: Disable LFN feature. _MAX_LFN and _LFN_UNICODE have no effect. |
rconnorlawson | 0:35660d7952f7 | 99 | / 1: Enable LFN with static working buffer on the BSS. Always NOT reentrant. |
rconnorlawson | 0:35660d7952f7 | 100 | / 2: Enable LFN with dynamic working buffer on the STACK. |
rconnorlawson | 0:35660d7952f7 | 101 | / 3: Enable LFN with dynamic working buffer on the HEAP. |
rconnorlawson | 0:35660d7952f7 | 102 | / |
rconnorlawson | 0:35660d7952f7 | 103 | / The LFN working buffer occupies (_MAX_LFN + 1) * 2 bytes. To enable LFN, |
rconnorlawson | 0:35660d7952f7 | 104 | / Unicode handling functions ff_convert() and ff_wtoupper() must be added |
rconnorlawson | 0:35660d7952f7 | 105 | / to the project. When enable to use heap, memory control functions |
rconnorlawson | 0:35660d7952f7 | 106 | / ff_memalloc() and ff_memfree() must be added to the project. */ |
rconnorlawson | 0:35660d7952f7 | 107 | |
rconnorlawson | 0:35660d7952f7 | 108 | |
rconnorlawson | 0:35660d7952f7 | 109 | #define _LFN_UNICODE 0 /* 0:ANSI/OEM or 1:Unicode */ |
rconnorlawson | 0:35660d7952f7 | 110 | /* To switch the character code set on FatFs API to Unicode, |
rconnorlawson | 0:35660d7952f7 | 111 | / enable LFN feature and set _LFN_UNICODE to 1. */ |
rconnorlawson | 0:35660d7952f7 | 112 | |
rconnorlawson | 0:35660d7952f7 | 113 | |
rconnorlawson | 0:35660d7952f7 | 114 | #define _FS_RPATH 0 /* 0 to 2 */ |
rconnorlawson | 0:35660d7952f7 | 115 | /* The _FS_RPATH option configures relative path feature. |
rconnorlawson | 0:35660d7952f7 | 116 | / |
rconnorlawson | 0:35660d7952f7 | 117 | / 0: Disable relative path feature and remove related functions. |
rconnorlawson | 0:35660d7952f7 | 118 | / 1: Enable relative path. f_chdrive() and f_chdir() are available. |
rconnorlawson | 0:35660d7952f7 | 119 | / 2: f_getcwd() is available in addition to 1. |
rconnorlawson | 0:35660d7952f7 | 120 | / |
rconnorlawson | 0:35660d7952f7 | 121 | / Note that output of the f_readdir fnction is affected by this option. */ |
rconnorlawson | 0:35660d7952f7 | 122 | |
rconnorlawson | 0:35660d7952f7 | 123 | |
rconnorlawson | 0:35660d7952f7 | 124 | |
rconnorlawson | 0:35660d7952f7 | 125 | /*---------------------------------------------------------------------------/ |
rconnorlawson | 0:35660d7952f7 | 126 | / Physical Drive Configurations |
rconnorlawson | 0:35660d7952f7 | 127 | /----------------------------------------------------------------------------*/ |
rconnorlawson | 0:35660d7952f7 | 128 | |
rconnorlawson | 0:35660d7952f7 | 129 | #define _VOLUMES 1 |
rconnorlawson | 0:35660d7952f7 | 130 | /* Number of volumes (logical drives) to be used. */ |
rconnorlawson | 0:35660d7952f7 | 131 | |
rconnorlawson | 0:35660d7952f7 | 132 | |
rconnorlawson | 0:35660d7952f7 | 133 | #define _MAX_SS 512 /* 512, 1024, 2048 or 4096 */ |
rconnorlawson | 0:35660d7952f7 | 134 | /* Maximum sector size to be handled. |
rconnorlawson | 0:35660d7952f7 | 135 | / Always set 512 for memory card and hard disk but a larger value may be |
rconnorlawson | 0:35660d7952f7 | 136 | / required for on-board flash memory, floppy disk and optical disk. |
rconnorlawson | 0:35660d7952f7 | 137 | / When _MAX_SS is larger than 512, it configures FatFs to variable sector size |
rconnorlawson | 0:35660d7952f7 | 138 | / and GET_SECTOR_SIZE command must be implememted to the disk_ioctl function. */ |
rconnorlawson | 0:35660d7952f7 | 139 | |
rconnorlawson | 0:35660d7952f7 | 140 | |
rconnorlawson | 0:35660d7952f7 | 141 | #define _MULTI_PARTITION 0 /* 0:Single partition, 1/2:Enable multiple partition */ |
rconnorlawson | 0:35660d7952f7 | 142 | /* When set to 0, each volume is bound to the same physical drive number and |
rconnorlawson | 0:35660d7952f7 | 143 | / it can mount only first primaly partition. When it is set to 1, each volume |
rconnorlawson | 0:35660d7952f7 | 144 | / is tied to the partitions listed in VolToPart[]. */ |
rconnorlawson | 0:35660d7952f7 | 145 | |
rconnorlawson | 0:35660d7952f7 | 146 | |
rconnorlawson | 0:35660d7952f7 | 147 | #define _USE_ERASE 0 /* 0:Disable or 1:Enable */ |
rconnorlawson | 0:35660d7952f7 | 148 | /* To enable sector erase feature, set _USE_ERASE to 1. CTRL_ERASE_SECTOR command |
rconnorlawson | 0:35660d7952f7 | 149 | / should be added to the disk_ioctl functio. */ |
rconnorlawson | 0:35660d7952f7 | 150 | |
rconnorlawson | 0:35660d7952f7 | 151 | |
rconnorlawson | 0:35660d7952f7 | 152 | |
rconnorlawson | 0:35660d7952f7 | 153 | /*---------------------------------------------------------------------------/ |
rconnorlawson | 0:35660d7952f7 | 154 | / System Configurations |
rconnorlawson | 0:35660d7952f7 | 155 | /----------------------------------------------------------------------------*/ |
rconnorlawson | 0:35660d7952f7 | 156 | |
rconnorlawson | 0:35660d7952f7 | 157 | #define _WORD_ACCESS 0 /* 0 or 1 */ |
rconnorlawson | 0:35660d7952f7 | 158 | /* Set 0 first and it is always compatible with all platforms. The _WORD_ACCESS |
rconnorlawson | 0:35660d7952f7 | 159 | / option defines which access method is used to the word data on the FAT volume. |
rconnorlawson | 0:35660d7952f7 | 160 | / |
rconnorlawson | 0:35660d7952f7 | 161 | / 0: Byte-by-byte access. |
rconnorlawson | 0:35660d7952f7 | 162 | / 1: Word access. Do not choose this unless following condition is met. |
rconnorlawson | 0:35660d7952f7 | 163 | / |
rconnorlawson | 0:35660d7952f7 | 164 | / When the byte order on the memory is big-endian or address miss-aligned word |
rconnorlawson | 0:35660d7952f7 | 165 | / access results incorrect behavior, the _WORD_ACCESS must be set to 0. |
rconnorlawson | 0:35660d7952f7 | 166 | / If it is not the case, the value can also be set to 1 to improve the |
rconnorlawson | 0:35660d7952f7 | 167 | / performance and code size. |
rconnorlawson | 0:35660d7952f7 | 168 | */ |
rconnorlawson | 0:35660d7952f7 | 169 | |
rconnorlawson | 0:35660d7952f7 | 170 | |
rconnorlawson | 0:35660d7952f7 | 171 | /* A header file that defines sync object types on the O/S, such as |
rconnorlawson | 0:35660d7952f7 | 172 | / windows.h, ucos_ii.h and semphr.h, must be included prior to ff.h. */ |
rconnorlawson | 0:35660d7952f7 | 173 | |
rconnorlawson | 0:35660d7952f7 | 174 | #define _FS_REENTRANT 0 /* 0:Disable or 1:Enable */ |
rconnorlawson | 0:35660d7952f7 | 175 | #define _FS_TIMEOUT 1000 /* Timeout period in unit of time ticks */ |
rconnorlawson | 0:35660d7952f7 | 176 | #define _SYNC_t HANDLE /* O/S dependent type of sync object. e.g. HANDLE, OS_EVENT*, ID and etc.. */ |
rconnorlawson | 0:35660d7952f7 | 177 | |
rconnorlawson | 0:35660d7952f7 | 178 | /* The _FS_REENTRANT option switches the reentrancy (thread safe) of the FatFs module. |
rconnorlawson | 0:35660d7952f7 | 179 | / |
rconnorlawson | 0:35660d7952f7 | 180 | / 0: Disable reentrancy. _SYNC_t and _FS_TIMEOUT have no effect. |
rconnorlawson | 0:35660d7952f7 | 181 | / 1: Enable reentrancy. Also user provided synchronization handlers, |
rconnorlawson | 0:35660d7952f7 | 182 | / ff_req_grant, ff_rel_grant, ff_del_syncobj and ff_cre_syncobj |
rconnorlawson | 0:35660d7952f7 | 183 | / function must be added to the project. */ |
rconnorlawson | 0:35660d7952f7 | 184 | |
rconnorlawson | 0:35660d7952f7 | 185 | |
rconnorlawson | 0:35660d7952f7 | 186 | #define _FS_LOCK 0 /* 0:Disable or >=1:Enable */ |
rconnorlawson | 0:35660d7952f7 | 187 | /* To enable file lock control feature, set _FS_LOCK to 1 or greater. |
rconnorlawson | 0:35660d7952f7 | 188 | The value defines how many files can be opened simultaneously. */ |
rconnorlawson | 0:35660d7952f7 | 189 | |
rconnorlawson | 0:35660d7952f7 | 190 | |
rconnorlawson | 0:35660d7952f7 | 191 | #endif /* _FFCONFIG */ |