Local copy of the FatFileSystem.

Dependents:   SimpleWaveRecorderPlayer y_CameraC1098_ES_01 _test_SDHCFileSystem Application-SimpleWaveRecorderPlayerGenerator ... more

Committer:
shintamainjp
Date:
Sat Apr 14 02:24:08 2012 +0000
Revision:
0:8c55801ce311
Initial version.

Who changed what in which revision?

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