The code from https://github.com/vpcola/Nucleo

Committer:
sinrab
Date:
Wed Oct 08 11:00:24 2014 +0000
Revision:
0:5464d5e415e5
The code from https://github.com/vpcola/Nucleo

Who changed what in which revision?

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