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.
Dependents: DMSupport DMSupport DMSupport
Fork of DM_FATFileSystem by
ffconf.h
00001 /*---------------------------------------------------------------------------/ 00002 / FatFs - FAT file system module configuration file R0.09a (C)ChaN, 2012 00003 /----------------------------------------------------------------------------/ 00004 / 00005 / CAUTION! Do not forget to make clean the project after any changes to 00006 / the configuration options. 00007 / 00008 /----------------------------------------------------------------------------*/ 00009 #ifndef _FFCONF 00010 #define _FFCONF 4004 /* Revision ID */ 00011 00012 #define FFS_DBG 0 00013 00014 // For syncing 00015 #define HANDLE void* 00016 00017 /*---------------------------------------------------------------------------/ 00018 / Functions and Buffer Configurations 00019 /----------------------------------------------------------------------------*/ 00020 00021 #define _FS_TINY 0 /* 0:Normal or 1:Tiny */ 00022 /* When _FS_TINY is set to 1, FatFs uses the sector buffer in the file system 00023 / object instead of the sector buffer in the individual file object for file 00024 / data transfer. This reduces memory consumption 512 bytes each file object. */ 00025 00026 00027 #define _FS_READONLY 0 /* 0:Read/Write or 1:Read only */ 00028 /* Setting _FS_READONLY to 1 defines read only configuration. This removes 00029 / writing functions, f_write, f_sync, f_unlink, f_mkdir, f_chmod, f_rename, 00030 / f_truncate and useless f_getfree. */ 00031 00032 00033 #define _FS_MINIMIZE 0 /* 0 to 3 */ 00034 /* The _FS_MINIMIZE option defines minimization level to remove some functions. 00035 / 00036 / 0: Full function. 00037 / 1: f_stat, f_getfree, f_unlink, f_mkdir, f_chmod, f_truncate and f_rename 00038 / are removed. 00039 / 2: f_opendir and f_readdir are removed in addition to 1. 00040 / 3: f_lseek is removed in addition to 2. */ 00041 00042 00043 #define _USE_STRFUNC 0 /* 0:Disable or 1-2:Enable */ 00044 /* To enable string functions, set _USE_STRFUNC to 1 or 2. */ 00045 00046 00047 #define _USE_MKFS 1 /* 0:Disable or 1:Enable */ 00048 /* To enable f_mkfs function, set _USE_MKFS to 1 and set _FS_READONLY to 0 */ 00049 00050 00051 #define _USE_FORWARD 0 /* 0:Disable or 1:Enable */ 00052 /* To enable f_forward function, set _USE_FORWARD to 1 and set _FS_TINY to 1. */ 00053 00054 00055 #define _USE_FASTSEEK 0 /* 0:Disable or 1:Enable */ 00056 /* To enable fast seek feature, set _USE_FASTSEEK to 1. */ 00057 00058 00059 00060 /*---------------------------------------------------------------------------/ 00061 / Locale and Namespace Configurations 00062 /----------------------------------------------------------------------------*/ 00063 00064 #define _CODE_PAGE 858 00065 /* The _CODE_PAGE specifies the OEM code page to be used on the target system. 00066 / Incorrect setting of the code page can cause a file open failure. 00067 / 00068 / 932 - Japanese Shift-JIS (DBCS, OEM, Windows) 00069 / 936 - Simplified Chinese GBK (DBCS, OEM, Windows) 00070 / 949 - Korean (DBCS, OEM, Windows) 00071 / 950 - Traditional Chinese Big5 (DBCS, OEM, Windows) 00072 / 1250 - Central Europe (Windows) 00073 / 1251 - Cyrillic (Windows) 00074 / 1252 - Latin 1 (Windows) 00075 / 1253 - Greek (Windows) 00076 / 1254 - Turkish (Windows) 00077 / 1255 - Hebrew (Windows) 00078 / 1256 - Arabic (Windows) 00079 / 1257 - Baltic (Windows) 00080 / 1258 - Vietnam (OEM, Windows) 00081 / 437 - U.S. (OEM) 00082 / 720 - Arabic (OEM) 00083 / 737 - Greek (OEM) 00084 / 775 - Baltic (OEM) 00085 / 850 - Multilingual Latin 1 (OEM) 00086 / 858 - Multilingual Latin 1 + Euro (OEM) 00087 / 852 - Latin 2 (OEM) 00088 / 855 - Cyrillic (OEM) 00089 / 866 - Russian (OEM) 00090 / 857 - Turkish (OEM) 00091 / 862 - Hebrew (OEM) 00092 / 874 - Thai (OEM, Windows) 00093 / 1 - ASCII only (Valid for non LFN cfg.) 00094 */ 00095 00096 00097 #define _USE_LFN 3 /* 0 to 3 */ 00098 #define _MAX_LFN 255 /* Maximum LFN length to handle (12 to 255) */ 00099 /* The _USE_LFN option switches the LFN support. 00100 / 00101 / 0: Disable LFN feature. _MAX_LFN and _LFN_UNICODE have no effect. 00102 / 1: Enable LFN with static working buffer on the BSS. Always NOT reentrant. 00103 / 2: Enable LFN with dynamic working buffer on the STACK. 00104 / 3: Enable LFN with dynamic working buffer on the HEAP. 00105 / 00106 / The LFN working buffer occupies (_MAX_LFN + 1) * 2 bytes. To enable LFN, 00107 / Unicode handling functions ff_convert() and ff_wtoupper() must be added 00108 / to the project. When enable to use heap, memory control functions 00109 / ff_memalloc() and ff_memfree() must be added to the project. */ 00110 00111 00112 #define _LFN_UNICODE 0 /* 0:ANSI/OEM or 1:Unicode */ 00113 /* To switch the character code set on FatFs API to Unicode, 00114 / enable LFN feature and set _LFN_UNICODE to 1. */ 00115 00116 00117 #define _FS_RPATH 0 /* 0 to 2 */ 00118 /* The _FS_RPATH option configures relative path feature. 00119 / 00120 / 0: Disable relative path feature and remove related functions. 00121 / 1: Enable relative path. f_chdrive() and f_chdir() are available. 00122 / 2: f_getcwd() is available in addition to 1. 00123 / 00124 / Note that output of the f_readdir fnction is affected by this option. */ 00125 00126 00127 00128 /*---------------------------------------------------------------------------/ 00129 / Physical Drive Configurations 00130 /----------------------------------------------------------------------------*/ 00131 00132 #define _VOLUMES 3 00133 /* Number of volumes (logical drives) to be used. */ 00134 00135 00136 #define _MAX_SS 512 /* 512, 1024, 2048 or 4096 */ 00137 /* Maximum sector size to be handled. 00138 / Always set 512 for memory card and hard disk but a larger value may be 00139 / required for on-board flash memory, floppy disk and optical disk. 00140 / When _MAX_SS is larger than 512, it configures FatFs to variable sector size 00141 / and GET_SECTOR_SIZE command must be implememted to the disk_ioctl function. */ 00142 00143 00144 #define _MULTI_PARTITION 0 /* 0:Single partition, 1/2:Enable multiple partition */ 00145 /* When set to 0, each volume is bound to the same physical drive number and 00146 / it can mount only first primaly partition. When it is set to 1, each volume 00147 / is tied to the partitions listed in VolToPart[]. */ 00148 00149 00150 #define _USE_ERASE 0 /* 0:Disable or 1:Enable */ 00151 /* To enable sector erase feature, set _USE_ERASE to 1. CTRL_ERASE_SECTOR command 00152 / should be added to the disk_ioctl functio. */ 00153 00154 00155 00156 /*---------------------------------------------------------------------------/ 00157 / System Configurations 00158 /----------------------------------------------------------------------------*/ 00159 00160 #define _WORD_ACCESS 0 /* 0 or 1 */ 00161 /* Set 0 first and it is always compatible with all platforms. The _WORD_ACCESS 00162 / option defines which access method is used to the word data on the FAT volume. 00163 / 00164 / 0: Byte-by-byte access. 00165 / 1: Word access. Do not choose this unless following condition is met. 00166 / 00167 / When the byte order on the memory is big-endian or address miss-aligned word 00168 / access results incorrect behavior, the _WORD_ACCESS must be set to 0. 00169 / If it is not the case, the value can also be set to 1 to improve the 00170 / performance and code size. 00171 */ 00172 00173 00174 /* A header file that defines sync object types on the O/S, such as 00175 / windows.h, ucos_ii.h and semphr.h, must be included prior to ff.h. */ 00176 00177 #define _FS_REENTRANT 1 /* 0:Disable or 1:Enable */ 00178 #define _FS_TIMEOUT 1000 /* Timeout period in unit of time ticks */ 00179 #define _SYNC_t HANDLE /* O/S dependent type of sync object. e.g. HANDLE, OS_EVENT*, ID and etc.. */ 00180 00181 /* The _FS_REENTRANT option switches the reentrancy (thread safe) of the FatFs module. 00182 / 00183 / 0: Disable reentrancy. _SYNC_t and _FS_TIMEOUT have no effect. 00184 / 1: Enable reentrancy. Also user provided synchronization handlers, 00185 / ff_req_grant, ff_rel_grant, ff_del_syncobj and ff_cre_syncobj 00186 / function must be added to the project. */ 00187 00188 00189 #define _FS_LOCK 0 /* 0:Disable or >=1:Enable */ 00190 /* To enable file lock control feature, set _FS_LOCK to 1 or greater. 00191 The value defines how many files can be opened simultaneously. */ 00192 00193 #define FLUSH_ON_NEW_CLUSTER 0 /* Sync the file on every new cluster */ 00194 #define FLUSH_ON_NEW_SECTOR 1 /* Sync the file on every new sector */ 00195 /* Only one of these two defines needs to be set to 1. If both are set to 0 00196 the file is only sync when closed. 00197 Clusters are group of sectors (eg: 8 sectors). Flushing on new cluster means 00198 it would be less often than flushing on new sector. Sectors are generally 00199 512 Bytes long. */ 00200 00201 #endif /* _FFCONFIG */
Generated on Tue Jul 12 2022 21:03:07 by
