Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
FatFS/ffconf.h@0:f24ba3a89ec1, 2015-09-30 (annotated)
- Committer:
 - danghuutoan
 - Date:
 - Wed Sep 30 10:12:16 2015 +0000
 - Revision:
 - 0:f24ba3a89ec1
 
read and write file successfully
Who changed what in which revision?
| User | Revision | Line number | New contents of line | 
|---|---|---|---|
| danghuutoan | 0:f24ba3a89ec1 | 1 | /*---------------------------------------------------------------------------/ | 
| danghuutoan | 0:f24ba3a89ec1 | 2 | / FatFs - FAT file system module configuration file R0.11a (C)ChaN, 2015 | 
| danghuutoan | 0:f24ba3a89ec1 | 3 | /---------------------------------------------------------------------------*/ | 
| danghuutoan | 0:f24ba3a89ec1 | 4 | |
| danghuutoan | 0:f24ba3a89ec1 | 5 | #define _FFCONF 64180 /* Revision ID */ | 
| danghuutoan | 0:f24ba3a89ec1 | 6 | |
| danghuutoan | 0:f24ba3a89ec1 | 7 | /*---------------------------------------------------------------------------/ | 
| danghuutoan | 0:f24ba3a89ec1 | 8 | / Function Configurations | 
| danghuutoan | 0:f24ba3a89ec1 | 9 | /---------------------------------------------------------------------------*/ | 
| danghuutoan | 0:f24ba3a89ec1 | 10 | |
| danghuutoan | 0:f24ba3a89ec1 | 11 | #define _FS_READONLY 0 | 
| danghuutoan | 0:f24ba3a89ec1 | 12 | /* This option switches read-only configuration. (0:Read/Write or 1:Read-only) | 
| danghuutoan | 0:f24ba3a89ec1 | 13 | / Read-only configuration removes writing API functions, f_write(), f_sync(), | 
| danghuutoan | 0:f24ba3a89ec1 | 14 | / f_unlink(), f_mkdir(), f_chmod(), f_rename(), f_truncate(), f_getfree() | 
| danghuutoan | 0:f24ba3a89ec1 | 15 | / and optional writing functions as well. */ | 
| danghuutoan | 0:f24ba3a89ec1 | 16 | |
| danghuutoan | 0:f24ba3a89ec1 | 17 | |
| danghuutoan | 0:f24ba3a89ec1 | 18 | #define _FS_MINIMIZE 0 | 
| danghuutoan | 0:f24ba3a89ec1 | 19 | /* This option defines minimization level to remove some basic API functions. | 
| danghuutoan | 0:f24ba3a89ec1 | 20 | / | 
| danghuutoan | 0:f24ba3a89ec1 | 21 | / 0: All basic functions are enabled. | 
| danghuutoan | 0:f24ba3a89ec1 | 22 | / 1: f_stat(), f_getfree(), f_unlink(), f_mkdir(), f_chmod(), f_utime(), | 
| danghuutoan | 0:f24ba3a89ec1 | 23 | / f_truncate() and f_rename() function are removed. | 
| danghuutoan | 0:f24ba3a89ec1 | 24 | / 2: f_opendir(), f_readdir() and f_closedir() are removed in addition to 1. | 
| danghuutoan | 0:f24ba3a89ec1 | 25 | / 3: f_lseek() function is removed in addition to 2. */ | 
| danghuutoan | 0:f24ba3a89ec1 | 26 | |
| danghuutoan | 0:f24ba3a89ec1 | 27 | |
| danghuutoan | 0:f24ba3a89ec1 | 28 | #define _USE_STRFUNC 1 | 
| danghuutoan | 0:f24ba3a89ec1 | 29 | /* This option switches string functions, f_gets(), f_putc(), f_puts() and | 
| danghuutoan | 0:f24ba3a89ec1 | 30 | / f_printf(). | 
| danghuutoan | 0:f24ba3a89ec1 | 31 | / | 
| danghuutoan | 0:f24ba3a89ec1 | 32 | / 0: Disable string functions. | 
| danghuutoan | 0:f24ba3a89ec1 | 33 | / 1: Enable without LF-CRLF conversion. | 
| danghuutoan | 0:f24ba3a89ec1 | 34 | / 2: Enable with LF-CRLF conversion. */ | 
| danghuutoan | 0:f24ba3a89ec1 | 35 | |
| danghuutoan | 0:f24ba3a89ec1 | 36 | |
| danghuutoan | 0:f24ba3a89ec1 | 37 | #define _USE_FIND 0 | 
| danghuutoan | 0:f24ba3a89ec1 | 38 | /* This option switches filtered directory read feature and related functions, | 
| danghuutoan | 0:f24ba3a89ec1 | 39 | / f_findfirst() and f_findnext(). (0:Disable or 1:Enable) */ | 
| danghuutoan | 0:f24ba3a89ec1 | 40 | |
| danghuutoan | 0:f24ba3a89ec1 | 41 | |
| danghuutoan | 0:f24ba3a89ec1 | 42 | #define _USE_MKFS 0 | 
| danghuutoan | 0:f24ba3a89ec1 | 43 | /* This option switches f_mkfs() function. (0:Disable or 1:Enable) */ | 
| danghuutoan | 0:f24ba3a89ec1 | 44 | |
| danghuutoan | 0:f24ba3a89ec1 | 45 | |
| danghuutoan | 0:f24ba3a89ec1 | 46 | #define _USE_FASTSEEK 0 | 
| danghuutoan | 0:f24ba3a89ec1 | 47 | /* This option switches fast seek feature. (0:Disable or 1:Enable) */ | 
| danghuutoan | 0:f24ba3a89ec1 | 48 | |
| danghuutoan | 0:f24ba3a89ec1 | 49 | |
| danghuutoan | 0:f24ba3a89ec1 | 50 | #define _USE_LABEL 0 | 
| danghuutoan | 0:f24ba3a89ec1 | 51 | /* This option switches volume label functions, f_getlabel() and f_setlabel(). | 
| danghuutoan | 0:f24ba3a89ec1 | 52 | / (0:Disable or 1:Enable) */ | 
| danghuutoan | 0:f24ba3a89ec1 | 53 | |
| danghuutoan | 0:f24ba3a89ec1 | 54 | |
| danghuutoan | 0:f24ba3a89ec1 | 55 | #define _USE_FORWARD 0 | 
| danghuutoan | 0:f24ba3a89ec1 | 56 | /* This option switches f_forward() function. (0:Disable or 1:Enable) | 
| danghuutoan | 0:f24ba3a89ec1 | 57 | / To enable it, also _FS_TINY need to be set to 1. */ | 
| danghuutoan | 0:f24ba3a89ec1 | 58 | |
| danghuutoan | 0:f24ba3a89ec1 | 59 | |
| danghuutoan | 0:f24ba3a89ec1 | 60 | /*---------------------------------------------------------------------------/ | 
| danghuutoan | 0:f24ba3a89ec1 | 61 | / Locale and Namespace Configurations | 
| danghuutoan | 0:f24ba3a89ec1 | 62 | /---------------------------------------------------------------------------*/ | 
| danghuutoan | 0:f24ba3a89ec1 | 63 | |
| danghuutoan | 0:f24ba3a89ec1 | 64 | #define _CODE_PAGE 437 | 
| danghuutoan | 0:f24ba3a89ec1 | 65 | /* This option specifies the OEM code page to be used on the target system. | 
| danghuutoan | 0:f24ba3a89ec1 | 66 | / Incorrect setting of the code page can cause a file open failure. | 
| danghuutoan | 0:f24ba3a89ec1 | 67 | / | 
| danghuutoan | 0:f24ba3a89ec1 | 68 | / 1 - ASCII (No extended character. Non-LFN cfg. only) | 
| danghuutoan | 0:f24ba3a89ec1 | 69 | / 437 - U.S. | 
| danghuutoan | 0:f24ba3a89ec1 | 70 | / 720 - Arabic | 
| danghuutoan | 0:f24ba3a89ec1 | 71 | / 737 - Greek | 
| danghuutoan | 0:f24ba3a89ec1 | 72 | / 771 - KBL | 
| danghuutoan | 0:f24ba3a89ec1 | 73 | / 775 - Baltic | 
| danghuutoan | 0:f24ba3a89ec1 | 74 | / 850 - Latin 1 | 
| danghuutoan | 0:f24ba3a89ec1 | 75 | / 852 - Latin 2 | 
| danghuutoan | 0:f24ba3a89ec1 | 76 | / 855 - Cyrillic | 
| danghuutoan | 0:f24ba3a89ec1 | 77 | / 857 - Turkish | 
| danghuutoan | 0:f24ba3a89ec1 | 78 | / 860 - Portuguese | 
| danghuutoan | 0:f24ba3a89ec1 | 79 | / 861 - Icelandic | 
| danghuutoan | 0:f24ba3a89ec1 | 80 | / 862 - Hebrew | 
| danghuutoan | 0:f24ba3a89ec1 | 81 | / 863 - Canadian French | 
| danghuutoan | 0:f24ba3a89ec1 | 82 | / 864 - Arabic | 
| danghuutoan | 0:f24ba3a89ec1 | 83 | / 865 - Nordic | 
| danghuutoan | 0:f24ba3a89ec1 | 84 | / 866 - Russian | 
| danghuutoan | 0:f24ba3a89ec1 | 85 | / 869 - Greek 2 | 
| danghuutoan | 0:f24ba3a89ec1 | 86 | / 932 - Japanese (DBCS) | 
| danghuutoan | 0:f24ba3a89ec1 | 87 | / 936 - Simplified Chinese (DBCS) | 
| danghuutoan | 0:f24ba3a89ec1 | 88 | / 949 - Korean (DBCS) | 
| danghuutoan | 0:f24ba3a89ec1 | 89 | / 950 - Traditional Chinese (DBCS) | 
| danghuutoan | 0:f24ba3a89ec1 | 90 | */ | 
| danghuutoan | 0:f24ba3a89ec1 | 91 | |
| danghuutoan | 0:f24ba3a89ec1 | 92 | |
| danghuutoan | 0:f24ba3a89ec1 | 93 | #define _USE_LFN 1 | 
| danghuutoan | 0:f24ba3a89ec1 | 94 | #define _MAX_LFN 255 | 
| danghuutoan | 0:f24ba3a89ec1 | 95 | /* The _USE_LFN option switches the LFN feature. | 
| danghuutoan | 0:f24ba3a89ec1 | 96 | / | 
| danghuutoan | 0:f24ba3a89ec1 | 97 | / 0: Disable LFN feature. _MAX_LFN has no effect. | 
| danghuutoan | 0:f24ba3a89ec1 | 98 | / 1: Enable LFN with static working buffer on the BSS. Always NOT thread-safe. | 
| danghuutoan | 0:f24ba3a89ec1 | 99 | / 2: Enable LFN with dynamic working buffer on the STACK. | 
| danghuutoan | 0:f24ba3a89ec1 | 100 | / 3: Enable LFN with dynamic working buffer on the HEAP. | 
| danghuutoan | 0:f24ba3a89ec1 | 101 | / | 
| danghuutoan | 0:f24ba3a89ec1 | 102 | / When enable the LFN feature, Unicode handling functions (option/unicode.c) must | 
| danghuutoan | 0:f24ba3a89ec1 | 103 | / be added to the project. The LFN working buffer occupies (_MAX_LFN + 1) * 2 bytes. | 
| danghuutoan | 0:f24ba3a89ec1 | 104 | / When use stack for the working buffer, take care on stack overflow. When use heap | 
| danghuutoan | 0:f24ba3a89ec1 | 105 | / memory for the working buffer, memory management functions, ff_memalloc() and | 
| danghuutoan | 0:f24ba3a89ec1 | 106 | / ff_memfree(), must be added to the project. */ | 
| danghuutoan | 0:f24ba3a89ec1 | 107 | |
| danghuutoan | 0:f24ba3a89ec1 | 108 | |
| danghuutoan | 0:f24ba3a89ec1 | 109 | #define _LFN_UNICODE 0 | 
| danghuutoan | 0:f24ba3a89ec1 | 110 | /* This option switches character encoding on the API. (0:ANSI/OEM or 1:Unicode) | 
| danghuutoan | 0:f24ba3a89ec1 | 111 | / To use Unicode string for the path name, enable LFN feature and set _LFN_UNICODE | 
| danghuutoan | 0:f24ba3a89ec1 | 112 | / to 1. This option also affects behavior of string I/O functions. */ | 
| danghuutoan | 0:f24ba3a89ec1 | 113 | |
| danghuutoan | 0:f24ba3a89ec1 | 114 | |
| danghuutoan | 0:f24ba3a89ec1 | 115 | #define _STRF_ENCODE 3 | 
| danghuutoan | 0:f24ba3a89ec1 | 116 | /* When _LFN_UNICODE is 1, this option selects the character encoding on the file to | 
| danghuutoan | 0:f24ba3a89ec1 | 117 | / be read/written via string I/O functions, f_gets(), f_putc(), f_puts and f_printf(). | 
| danghuutoan | 0:f24ba3a89ec1 | 118 | / | 
| danghuutoan | 0:f24ba3a89ec1 | 119 | / 0: ANSI/OEM | 
| danghuutoan | 0:f24ba3a89ec1 | 120 | / 1: UTF-16LE | 
| danghuutoan | 0:f24ba3a89ec1 | 121 | / 2: UTF-16BE | 
| danghuutoan | 0:f24ba3a89ec1 | 122 | / 3: UTF-8 | 
| danghuutoan | 0:f24ba3a89ec1 | 123 | / | 
| danghuutoan | 0:f24ba3a89ec1 | 124 | / When _LFN_UNICODE is 0, this option has no effect. */ | 
| danghuutoan | 0:f24ba3a89ec1 | 125 | |
| danghuutoan | 0:f24ba3a89ec1 | 126 | |
| danghuutoan | 0:f24ba3a89ec1 | 127 | #define _FS_RPATH 0 | 
| danghuutoan | 0:f24ba3a89ec1 | 128 | /* This option configures relative path feature. | 
| danghuutoan | 0:f24ba3a89ec1 | 129 | / | 
| danghuutoan | 0:f24ba3a89ec1 | 130 | / 0: Disable relative path feature and remove related functions. | 
| danghuutoan | 0:f24ba3a89ec1 | 131 | / 1: Enable relative path feature. f_chdir() and f_chdrive() are available. | 
| danghuutoan | 0:f24ba3a89ec1 | 132 | / 2: f_getcwd() function is available in addition to 1. | 
| danghuutoan | 0:f24ba3a89ec1 | 133 | / | 
| danghuutoan | 0:f24ba3a89ec1 | 134 | / Note that directory items read via f_readdir() are affected by this option. */ | 
| danghuutoan | 0:f24ba3a89ec1 | 135 | |
| danghuutoan | 0:f24ba3a89ec1 | 136 | |
| danghuutoan | 0:f24ba3a89ec1 | 137 | /*---------------------------------------------------------------------------/ | 
| danghuutoan | 0:f24ba3a89ec1 | 138 | / Drive/Volume Configurations | 
| danghuutoan | 0:f24ba3a89ec1 | 139 | /---------------------------------------------------------------------------*/ | 
| danghuutoan | 0:f24ba3a89ec1 | 140 | |
| danghuutoan | 0:f24ba3a89ec1 | 141 | #define _VOLUMES 1 | 
| danghuutoan | 0:f24ba3a89ec1 | 142 | /* Number of volumes (logical drives) to be used. */ | 
| danghuutoan | 0:f24ba3a89ec1 | 143 | |
| danghuutoan | 0:f24ba3a89ec1 | 144 | |
| danghuutoan | 0:f24ba3a89ec1 | 145 | #define _STR_VOLUME_ID 0 | 
| danghuutoan | 0:f24ba3a89ec1 | 146 | #define _VOLUME_STRS "RAM","NAND","CF","SD1","SD2","USB1","USB2","USB3" | 
| danghuutoan | 0:f24ba3a89ec1 | 147 | /* _STR_VOLUME_ID option switches string volume ID feature. | 
| danghuutoan | 0:f24ba3a89ec1 | 148 | / When _STR_VOLUME_ID is set to 1, also pre-defined strings can be used as drive | 
| danghuutoan | 0:f24ba3a89ec1 | 149 | / number in the path name. _VOLUME_STRS defines the drive ID strings for each | 
| danghuutoan | 0:f24ba3a89ec1 | 150 | / logical drives. Number of items must be equal to _VOLUMES. Valid characters for | 
| danghuutoan | 0:f24ba3a89ec1 | 151 | / the drive ID strings are: A-Z and 0-9. */ | 
| danghuutoan | 0:f24ba3a89ec1 | 152 | |
| danghuutoan | 0:f24ba3a89ec1 | 153 | |
| danghuutoan | 0:f24ba3a89ec1 | 154 | #define _MULTI_PARTITION 0 | 
| danghuutoan | 0:f24ba3a89ec1 | 155 | /* This option switches multi-partition feature. By default (0), each logical drive | 
| danghuutoan | 0:f24ba3a89ec1 | 156 | / number is bound to the same physical drive number and only an FAT volume found on | 
| danghuutoan | 0:f24ba3a89ec1 | 157 | / the physical drive will be mounted. When multi-partition feature is enabled (1), | 
| danghuutoan | 0:f24ba3a89ec1 | 158 | / each logical drive number is bound to arbitrary physical drive and partition | 
| danghuutoan | 0:f24ba3a89ec1 | 159 | / listed in the VolToPart[]. Also f_fdisk() funciton will be available. */ | 
| danghuutoan | 0:f24ba3a89ec1 | 160 | |
| danghuutoan | 0:f24ba3a89ec1 | 161 | |
| danghuutoan | 0:f24ba3a89ec1 | 162 | #define _MIN_SS 512 | 
| danghuutoan | 0:f24ba3a89ec1 | 163 | #define _MAX_SS 512 | 
| danghuutoan | 0:f24ba3a89ec1 | 164 | /* These options configure the range of sector size to be supported. (512, 1024, | 
| danghuutoan | 0:f24ba3a89ec1 | 165 | / 2048 or 4096) Always set both 512 for most systems, all type of memory cards and | 
| danghuutoan | 0:f24ba3a89ec1 | 166 | / harddisk. But a larger value may be required for on-board flash memory and some | 
| danghuutoan | 0:f24ba3a89ec1 | 167 | / type of optical media. When _MAX_SS is larger than _MIN_SS, FatFs is configured | 
| danghuutoan | 0:f24ba3a89ec1 | 168 | / to variable sector size and GET_SECTOR_SIZE command must be implemented to the | 
| danghuutoan | 0:f24ba3a89ec1 | 169 | / disk_ioctl() function. */ | 
| danghuutoan | 0:f24ba3a89ec1 | 170 | |
| danghuutoan | 0:f24ba3a89ec1 | 171 | |
| danghuutoan | 0:f24ba3a89ec1 | 172 | #define _USE_TRIM 0 | 
| danghuutoan | 0:f24ba3a89ec1 | 173 | /* This option switches ATA-TRIM feature. (0:Disable or 1:Enable) | 
| danghuutoan | 0:f24ba3a89ec1 | 174 | / To enable Trim feature, also CTRL_TRIM command should be implemented to the | 
| danghuutoan | 0:f24ba3a89ec1 | 175 | / disk_ioctl() function. */ | 
| danghuutoan | 0:f24ba3a89ec1 | 176 | |
| danghuutoan | 0:f24ba3a89ec1 | 177 | |
| danghuutoan | 0:f24ba3a89ec1 | 178 | #define _FS_NOFSINFO 0 | 
| danghuutoan | 0:f24ba3a89ec1 | 179 | /* If you need to know correct free space on the FAT32 volume, set bit 0 of this | 
| danghuutoan | 0:f24ba3a89ec1 | 180 | / option, and f_getfree() function at first time after volume mount will force | 
| danghuutoan | 0:f24ba3a89ec1 | 181 | / a full FAT scan. Bit 1 controls the use of last allocated cluster number. | 
| danghuutoan | 0:f24ba3a89ec1 | 182 | / | 
| danghuutoan | 0:f24ba3a89ec1 | 183 | / bit0=0: Use free cluster count in the FSINFO if available. | 
| danghuutoan | 0:f24ba3a89ec1 | 184 | / bit0=1: Do not trust free cluster count in the FSINFO. | 
| danghuutoan | 0:f24ba3a89ec1 | 185 | / bit1=0: Use last allocated cluster number in the FSINFO if available. | 
| danghuutoan | 0:f24ba3a89ec1 | 186 | / bit1=1: Do not trust last allocated cluster number in the FSINFO. | 
| danghuutoan | 0:f24ba3a89ec1 | 187 | */ | 
| danghuutoan | 0:f24ba3a89ec1 | 188 | |
| danghuutoan | 0:f24ba3a89ec1 | 189 | |
| danghuutoan | 0:f24ba3a89ec1 | 190 | |
| danghuutoan | 0:f24ba3a89ec1 | 191 | /*---------------------------------------------------------------------------/ | 
| danghuutoan | 0:f24ba3a89ec1 | 192 | / System Configurations | 
| danghuutoan | 0:f24ba3a89ec1 | 193 | /---------------------------------------------------------------------------*/ | 
| danghuutoan | 0:f24ba3a89ec1 | 194 | |
| danghuutoan | 0:f24ba3a89ec1 | 195 | #define _FS_TINY 0 | 
| danghuutoan | 0:f24ba3a89ec1 | 196 | /* This option switches tiny buffer configuration. (0:Normal or 1:Tiny) | 
| danghuutoan | 0:f24ba3a89ec1 | 197 | / At the tiny configuration, size of the file object (FIL) is reduced _MAX_SS | 
| danghuutoan | 0:f24ba3a89ec1 | 198 | / bytes. Instead of private sector buffer eliminated from the file object, | 
| danghuutoan | 0:f24ba3a89ec1 | 199 | / common sector buffer in the file system object (FATFS) is used for the file | 
| danghuutoan | 0:f24ba3a89ec1 | 200 | / data transfer. */ | 
| danghuutoan | 0:f24ba3a89ec1 | 201 | |
| danghuutoan | 0:f24ba3a89ec1 | 202 | |
| danghuutoan | 0:f24ba3a89ec1 | 203 | #define _FS_NORTC 0 | 
| danghuutoan | 0:f24ba3a89ec1 | 204 | #define _NORTC_MON 1 | 
| danghuutoan | 0:f24ba3a89ec1 | 205 | #define _NORTC_MDAY 1 | 
| danghuutoan | 0:f24ba3a89ec1 | 206 | #define _NORTC_YEAR 2015 | 
| danghuutoan | 0:f24ba3a89ec1 | 207 | /* The _FS_NORTC option switches timestamp feature. If the system does not have | 
| danghuutoan | 0:f24ba3a89ec1 | 208 | / an RTC function or valid timestamp is not needed, set _FS_NORTC to 1 to disable | 
| danghuutoan | 0:f24ba3a89ec1 | 209 | / the timestamp feature. All objects modified by FatFs will have a fixed timestamp | 
| danghuutoan | 0:f24ba3a89ec1 | 210 | / defined by _NORTC_MON, _NORTC_MDAY and _NORTC_YEAR. | 
| danghuutoan | 0:f24ba3a89ec1 | 211 | / When timestamp feature is enabled (_FS_NORTC == 0), get_fattime() function need | 
| danghuutoan | 0:f24ba3a89ec1 | 212 | / to be added to the project to read current time form RTC. _NORTC_MON, | 
| danghuutoan | 0:f24ba3a89ec1 | 213 | / _NORTC_MDAY and _NORTC_YEAR have no effect. | 
| danghuutoan | 0:f24ba3a89ec1 | 214 | / These options have no effect at read-only configuration (_FS_READONLY == 1). */ | 
| danghuutoan | 0:f24ba3a89ec1 | 215 | |
| danghuutoan | 0:f24ba3a89ec1 | 216 | |
| danghuutoan | 0:f24ba3a89ec1 | 217 | #define _FS_LOCK 0 | 
| danghuutoan | 0:f24ba3a89ec1 | 218 | /* The _FS_LOCK option switches file lock feature to control duplicated file open | 
| danghuutoan | 0:f24ba3a89ec1 | 219 | / and illegal operation to open objects. This option must be 0 when _FS_READONLY | 
| danghuutoan | 0:f24ba3a89ec1 | 220 | / is 1. | 
| danghuutoan | 0:f24ba3a89ec1 | 221 | / | 
| danghuutoan | 0:f24ba3a89ec1 | 222 | / 0: Disable file lock feature. To avoid volume corruption, application program | 
| danghuutoan | 0:f24ba3a89ec1 | 223 | / should avoid illegal open, remove and rename to the open objects. | 
| danghuutoan | 0:f24ba3a89ec1 | 224 | / >0: Enable file lock feature. The value defines how many files/sub-directories | 
| danghuutoan | 0:f24ba3a89ec1 | 225 | / can be opened simultaneously under file lock control. Note that the file | 
| danghuutoan | 0:f24ba3a89ec1 | 226 | / lock feature is independent of re-entrancy. */ | 
| danghuutoan | 0:f24ba3a89ec1 | 227 | |
| danghuutoan | 0:f24ba3a89ec1 | 228 | |
| danghuutoan | 0:f24ba3a89ec1 | 229 | #define _FS_REENTRANT 0 | 
| danghuutoan | 0:f24ba3a89ec1 | 230 | #define _FS_TIMEOUT 1000 | 
| danghuutoan | 0:f24ba3a89ec1 | 231 | #define _SYNC_t HANDLE | 
| danghuutoan | 0:f24ba3a89ec1 | 232 | /* The _FS_REENTRANT option switches the re-entrancy (thread safe) of the FatFs | 
| danghuutoan | 0:f24ba3a89ec1 | 233 | / module itself. Note that regardless of this option, file access to different | 
| danghuutoan | 0:f24ba3a89ec1 | 234 | / volume is always re-entrant and volume control functions, f_mount(), f_mkfs() | 
| danghuutoan | 0:f24ba3a89ec1 | 235 | / and f_fdisk() function, are always not re-entrant. Only file/directory access | 
| danghuutoan | 0:f24ba3a89ec1 | 236 | / to the same volume is under control of this feature. | 
| danghuutoan | 0:f24ba3a89ec1 | 237 | / | 
| danghuutoan | 0:f24ba3a89ec1 | 238 | / 0: Disable re-entrancy. _FS_TIMEOUT and _SYNC_t have no effect. | 
| danghuutoan | 0:f24ba3a89ec1 | 239 | / 1: Enable re-entrancy. Also user provided synchronization handlers, | 
| danghuutoan | 0:f24ba3a89ec1 | 240 | / ff_req_grant(), ff_rel_grant(), ff_del_syncobj() and ff_cre_syncobj() | 
| danghuutoan | 0:f24ba3a89ec1 | 241 | / function, must be added to the project. Samples are available in | 
| danghuutoan | 0:f24ba3a89ec1 | 242 | / option/syscall.c. | 
| danghuutoan | 0:f24ba3a89ec1 | 243 | / | 
| danghuutoan | 0:f24ba3a89ec1 | 244 | / The _FS_TIMEOUT defines timeout period in unit of time tick. | 
| danghuutoan | 0:f24ba3a89ec1 | 245 | / The _SYNC_t defines O/S dependent sync object type. e.g. HANDLE, ID, OS_EVENT*, | 
| danghuutoan | 0:f24ba3a89ec1 | 246 | / SemaphoreHandle_t and etc.. A header file for O/S definitions needs to be | 
| danghuutoan | 0:f24ba3a89ec1 | 247 | / included somewhere in the scope of ff.c. */ | 
| danghuutoan | 0:f24ba3a89ec1 | 248 | |
| danghuutoan | 0:f24ba3a89ec1 | 249 | |
| danghuutoan | 0:f24ba3a89ec1 | 250 | #define _WORD_ACCESS 0 | 
| danghuutoan | 0:f24ba3a89ec1 | 251 | /* The _WORD_ACCESS option is an only platform dependent option. It defines | 
| danghuutoan | 0:f24ba3a89ec1 | 252 | / which access method is used to the word data on the FAT volume. | 
| danghuutoan | 0:f24ba3a89ec1 | 253 | / | 
| danghuutoan | 0:f24ba3a89ec1 | 254 | / 0: Byte-by-byte access. Always compatible with all platforms. | 
| danghuutoan | 0:f24ba3a89ec1 | 255 | / 1: Word access. Do not choose this unless under both the following conditions. | 
| danghuutoan | 0:f24ba3a89ec1 | 256 | / | 
| danghuutoan | 0:f24ba3a89ec1 | 257 | / * Address misaligned memory access is always allowed to ALL instructions. | 
| danghuutoan | 0:f24ba3a89ec1 | 258 | / * Byte order on the memory is little-endian. | 
| danghuutoan | 0:f24ba3a89ec1 | 259 | / | 
| danghuutoan | 0:f24ba3a89ec1 | 260 | / If it is the case, _WORD_ACCESS can also be set to 1 to reduce code size. | 
| danghuutoan | 0:f24ba3a89ec1 | 261 | / Following table shows allowable settings of some type of processors. | 
| danghuutoan | 0:f24ba3a89ec1 | 262 | / | 
| danghuutoan | 0:f24ba3a89ec1 | 263 | / ARM7TDMI 0 *2 ColdFire 0 *1 V850E 0 *2 | 
| danghuutoan | 0:f24ba3a89ec1 | 264 | / Cortex-M3 0 *3 Z80 0/1 V850ES 0/1 | 
| danghuutoan | 0:f24ba3a89ec1 | 265 | / Cortex-M0 0 *2 x86 0/1 TLCS-870 0/1 | 
| danghuutoan | 0:f24ba3a89ec1 | 266 | / AVR 0/1 RX600(LE) 0/1 TLCS-900 0/1 | 
| danghuutoan | 0:f24ba3a89ec1 | 267 | / AVR32 0 *1 RL78 0 *2 R32C 0 *2 | 
| danghuutoan | 0:f24ba3a89ec1 | 268 | / PIC18 0/1 SH-2 0 *1 M16C 0/1 | 
| danghuutoan | 0:f24ba3a89ec1 | 269 | / PIC24 0 *2 H8S 0 *1 MSP430 0 *2 | 
| danghuutoan | 0:f24ba3a89ec1 | 270 | / PIC32 0 *1 H8/300H 0 *1 8051 0/1 | 
| danghuutoan | 0:f24ba3a89ec1 | 271 | / | 
| danghuutoan | 0:f24ba3a89ec1 | 272 | / *1:Big-endian. | 
| danghuutoan | 0:f24ba3a89ec1 | 273 | / *2:Unaligned memory access is not supported. | 
| danghuutoan | 0:f24ba3a89ec1 | 274 | / *3:Some compilers generate LDM/STM for mem_cpy function. | 
| danghuutoan | 0:f24ba3a89ec1 | 275 | */ | 
| danghuutoan | 0:f24ba3a89ec1 | 276 | |
| danghuutoan | 0:f24ba3a89ec1 | 277 |