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