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