-

Dependents:   RSALB_hbridge_helloworld RSALB_lobster WavPlayer_test AudioCODEC_HelloWorld ... more

Fork of FatFileSystemCpp by Igor Skochinsky

Committer:
p07gbar
Date:
Wed Sep 19 11:03:35 2012 +0000
Revision:
2:e869ee8f3c3d
Parent:
0:6ceefe1c53e4
-

Who changed what in which revision?

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