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