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