FAT file system

Dependents:   S25FL216K_FATFileSystem SDFileSystem

Committer:
mkilivan
Date:
Tue Dec 23 21:37:54 2014 +0000
Revision:
0:b864b021fc6d
initial commit

Who changed what in which revision?

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