This is SDFileSystem which corrected the bug for MiMicSDK.

Dependents:   MbedFileServer_1768MiniDK2 RedWireBridge IssueDebug_gcc MiMicRemoteMCU-for-Mbed ... more

Fork of SDFileSystem by mbed official

Committer:
nyatla
Date:
Thu Apr 25 02:14:56 2013 +0000
Revision:
5:2c7b6bd5b079
This is SDFileSystem which corrected the bug. ;

Who changed what in which revision?

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