Dependencies:   mbed Servo

Committer:
eric11fr
Date:
Tue Oct 27 22:22:14 2020 +0000
Revision:
4:34a8e94c6fd5
Parent:
0:b8bade04f24f
test menu via xbee

Who changed what in which revision?

UserRevisionLine numberNew contents of line
eric11fr 0:b8bade04f24f 1 /*---------------------------------------------------------------------------/
eric11fr 0:b8bade04f24f 2 / FatFs - FAT file system module configuration file R0.11a (C)ChaN, 2015
eric11fr 0:b8bade04f24f 3 /---------------------------------------------------------------------------*/
eric11fr 0:b8bade04f24f 4
eric11fr 0:b8bade04f24f 5 #define _FFCONF 64180 /* Revision ID */
eric11fr 0:b8bade04f24f 6
eric11fr 0:b8bade04f24f 7 #define FFS_DBG 0
eric11fr 0:b8bade04f24f 8
eric11fr 0:b8bade04f24f 9 /*---------------------------------------------------------------------------/
eric11fr 0:b8bade04f24f 10 / Function Configurations
eric11fr 0:b8bade04f24f 11 /---------------------------------------------------------------------------*/
eric11fr 0:b8bade04f24f 12
eric11fr 0:b8bade04f24f 13 #define _FS_READONLY 0
eric11fr 0:b8bade04f24f 14 /* This option switches read-only configuration. (0:Read/Write or 1:Read-only)
eric11fr 0:b8bade04f24f 15 / Read-only configuration removes writing API functions, f_write(), f_sync(),
eric11fr 0:b8bade04f24f 16 / f_unlink(), f_mkdir(), f_chmod(), f_rename(), f_truncate(), f_getfree()
eric11fr 0:b8bade04f24f 17 / and optional writing functions as well. */
eric11fr 0:b8bade04f24f 18
eric11fr 0:b8bade04f24f 19
eric11fr 0:b8bade04f24f 20 #define _FS_MINIMIZE 0
eric11fr 0:b8bade04f24f 21 /* This option defines minimization level to remove some basic API functions.
eric11fr 0:b8bade04f24f 22 /
eric11fr 0:b8bade04f24f 23 / 0: All basic functions are enabled.
eric11fr 0:b8bade04f24f 24 / 1: f_stat(), f_getfree(), f_unlink(), f_mkdir(), f_chmod(), f_utime(),
eric11fr 0:b8bade04f24f 25 / f_truncate() and f_rename() function are removed.
eric11fr 0:b8bade04f24f 26 / 2: f_opendir(), f_readdir() and f_closedir() are removed in addition to 1.
eric11fr 0:b8bade04f24f 27 / 3: f_lseek() function is removed in addition to 2. */
eric11fr 0:b8bade04f24f 28
eric11fr 0:b8bade04f24f 29
eric11fr 0:b8bade04f24f 30 #define _USE_STRFUNC 0
eric11fr 0:b8bade04f24f 31 /* This option switches string functions, f_gets(), f_putc(), f_puts() and
eric11fr 0:b8bade04f24f 32 / f_printf().
eric11fr 0:b8bade04f24f 33 /
eric11fr 0:b8bade04f24f 34 / 0: Disable string functions.
eric11fr 0:b8bade04f24f 35 / 1: Enable without LF-CRLF conversion.
eric11fr 0:b8bade04f24f 36 / 2: Enable with LF-CRLF conversion. */
eric11fr 0:b8bade04f24f 37
eric11fr 0:b8bade04f24f 38
eric11fr 0:b8bade04f24f 39 #define _USE_FIND 0
eric11fr 0:b8bade04f24f 40 /* This option switches filtered directory read feature and related functions,
eric11fr 0:b8bade04f24f 41 / f_findfirst() and f_findnext(). (0:Disable or 1:Enable) */
eric11fr 0:b8bade04f24f 42
eric11fr 0:b8bade04f24f 43
eric11fr 0:b8bade04f24f 44 #define _USE_MKFS 1
eric11fr 0:b8bade04f24f 45 /* This option switches f_mkfs() function. (0:Disable or 1:Enable) */
eric11fr 0:b8bade04f24f 46
eric11fr 0:b8bade04f24f 47
eric11fr 0:b8bade04f24f 48 #define _USE_FASTSEEK 0
eric11fr 0:b8bade04f24f 49 /* This option switches fast seek feature. (0:Disable or 1:Enable) */
eric11fr 0:b8bade04f24f 50
eric11fr 0:b8bade04f24f 51
eric11fr 0:b8bade04f24f 52 #define _USE_LABEL 0
eric11fr 0:b8bade04f24f 53 /* This option switches volume label functions, f_getlabel() and f_setlabel().
eric11fr 0:b8bade04f24f 54 / (0:Disable or 1:Enable) */
eric11fr 0:b8bade04f24f 55
eric11fr 0:b8bade04f24f 56
eric11fr 0:b8bade04f24f 57 #define _USE_FORWARD 0
eric11fr 0:b8bade04f24f 58 /* This option switches f_forward() function. (0:Disable or 1:Enable)
eric11fr 0:b8bade04f24f 59 / To enable it, also _FS_TINY need to be set to 1. */
eric11fr 0:b8bade04f24f 60
eric11fr 0:b8bade04f24f 61
eric11fr 0:b8bade04f24f 62 /*---------------------------------------------------------------------------/
eric11fr 0:b8bade04f24f 63 / Locale and Namespace Configurations
eric11fr 0:b8bade04f24f 64 /---------------------------------------------------------------------------*/
eric11fr 0:b8bade04f24f 65
eric11fr 0:b8bade04f24f 66 #define _CODE_PAGE 850
eric11fr 0:b8bade04f24f 67 /* This option specifies the OEM code page to be used on the target system.
eric11fr 0:b8bade04f24f 68 / Incorrect setting of the code page can cause a file open failure.
eric11fr 0:b8bade04f24f 69 /
eric11fr 0:b8bade04f24f 70 / 1 - ASCII (No extended character. Non-LFN cfg. only)
eric11fr 0:b8bade04f24f 71 / 437 - U.S.
eric11fr 0:b8bade04f24f 72 / 720 - Arabic
eric11fr 0:b8bade04f24f 73 / 737 - Greek
eric11fr 0:b8bade04f24f 74 / 771 - KBL
eric11fr 0:b8bade04f24f 75 / 775 - Baltic
eric11fr 0:b8bade04f24f 76 / 850 - Latin 1
eric11fr 0:b8bade04f24f 77 / 852 - Latin 2
eric11fr 0:b8bade04f24f 78 / 855 - Cyrillic
eric11fr 0:b8bade04f24f 79 / 857 - Turkish
eric11fr 0:b8bade04f24f 80 / 860 - Portuguese
eric11fr 0:b8bade04f24f 81 / 861 - Icelandic
eric11fr 0:b8bade04f24f 82 / 862 - Hebrew
eric11fr 0:b8bade04f24f 83 / 863 - Canadian French
eric11fr 0:b8bade04f24f 84 / 864 - Arabic
eric11fr 0:b8bade04f24f 85 / 865 - Nordic
eric11fr 0:b8bade04f24f 86 / 866 - Russian
eric11fr 0:b8bade04f24f 87 / 869 - Greek 2
eric11fr 0:b8bade04f24f 88 / 932 - Japanese (DBCS)
eric11fr 0:b8bade04f24f 89 / 936 - Simplified Chinese (DBCS)
eric11fr 0:b8bade04f24f 90 / 949 - Korean (DBCS)
eric11fr 0:b8bade04f24f 91 / 950 - Traditional Chinese (DBCS)
eric11fr 0:b8bade04f24f 92 */
eric11fr 0:b8bade04f24f 93
eric11fr 0:b8bade04f24f 94
eric11fr 0:b8bade04f24f 95 #define _USE_LFN 1
eric11fr 0:b8bade04f24f 96 #define _MAX_LFN 255
eric11fr 0:b8bade04f24f 97 /* The _USE_LFN option switches the LFN feature.
eric11fr 0:b8bade04f24f 98 /
eric11fr 0:b8bade04f24f 99 / 0: Disable LFN feature. _MAX_LFN has no effect.
eric11fr 0:b8bade04f24f 100 / 1: Enable LFN with static working buffer on the BSS. Always NOT thread-safe.
eric11fr 0:b8bade04f24f 101 / 2: Enable LFN with dynamic working buffer on the STACK.
eric11fr 0:b8bade04f24f 102 / 3: Enable LFN with dynamic working buffer on the HEAP.
eric11fr 0:b8bade04f24f 103 /
eric11fr 0:b8bade04f24f 104 / When enable the LFN feature, Unicode handling functions (option/unicode.c) must
eric11fr 0:b8bade04f24f 105 / be added to the project. The LFN working buffer occupies (_MAX_LFN + 1) * 2 bytes.
eric11fr 0:b8bade04f24f 106 / When use stack for the working buffer, take care on stack overflow. When use heap
eric11fr 0:b8bade04f24f 107 / memory for the working buffer, memory management functions, ff_memalloc() and
eric11fr 0:b8bade04f24f 108 / ff_memfree(), must be added to the project. */
eric11fr 0:b8bade04f24f 109
eric11fr 0:b8bade04f24f 110
eric11fr 0:b8bade04f24f 111 #define _LFN_UNICODE 0
eric11fr 0:b8bade04f24f 112 /* This option switches character encoding on the API. (0:ANSI/OEM or 1:Unicode)
eric11fr 0:b8bade04f24f 113 / To use Unicode string for the path name, enable LFN feature and set _LFN_UNICODE
eric11fr 0:b8bade04f24f 114 / to 1. This option also affects behavior of string I/O functions. */
eric11fr 0:b8bade04f24f 115
eric11fr 0:b8bade04f24f 116
eric11fr 0:b8bade04f24f 117 #define _STRF_ENCODE 3
eric11fr 0:b8bade04f24f 118 /* When _LFN_UNICODE is 1, this option selects the character encoding on the file to
eric11fr 0:b8bade04f24f 119 / be read/written via string I/O functions, f_gets(), f_putc(), f_puts and f_printf().
eric11fr 0:b8bade04f24f 120 /
eric11fr 0:b8bade04f24f 121 / 0: ANSI/OEM
eric11fr 0:b8bade04f24f 122 / 1: UTF-16LE
eric11fr 0:b8bade04f24f 123 / 2: UTF-16BE
eric11fr 0:b8bade04f24f 124 / 3: UTF-8
eric11fr 0:b8bade04f24f 125 /
eric11fr 0:b8bade04f24f 126 / When _LFN_UNICODE is 0, this option has no effect. */
eric11fr 0:b8bade04f24f 127
eric11fr 0:b8bade04f24f 128
eric11fr 0:b8bade04f24f 129 #define _FS_RPATH 0
eric11fr 0:b8bade04f24f 130 /* This option configures relative path feature.
eric11fr 0:b8bade04f24f 131 /
eric11fr 0:b8bade04f24f 132 / 0: Disable relative path feature and remove related functions.
eric11fr 0:b8bade04f24f 133 / 1: Enable relative path feature. f_chdir() and f_chdrive() are available.
eric11fr 0:b8bade04f24f 134 / 2: f_getcwd() function is available in addition to 1.
eric11fr 0:b8bade04f24f 135 /
eric11fr 0:b8bade04f24f 136 / Note that directory items read via f_readdir() are affected by this option. */
eric11fr 0:b8bade04f24f 137
eric11fr 0:b8bade04f24f 138
eric11fr 0:b8bade04f24f 139 /*---------------------------------------------------------------------------/
eric11fr 0:b8bade04f24f 140 / Drive/Volume Configurations
eric11fr 0:b8bade04f24f 141 /---------------------------------------------------------------------------*/
eric11fr 0:b8bade04f24f 142
eric11fr 0:b8bade04f24f 143 #define _VOLUMES 1
eric11fr 0:b8bade04f24f 144 /* Number of volumes (logical drives) to be used. */
eric11fr 0:b8bade04f24f 145
eric11fr 0:b8bade04f24f 146
eric11fr 0:b8bade04f24f 147 #define _STR_VOLUME_ID 0
eric11fr 0:b8bade04f24f 148 #define _VOLUME_STRS "RAM","NAND","CF","SD1","SD2","USB1","USB2","USB3"
eric11fr 0:b8bade04f24f 149 /* _STR_VOLUME_ID option switches string volume ID feature.
eric11fr 0:b8bade04f24f 150 / When _STR_VOLUME_ID is set to 1, also pre-defined strings can be used as drive
eric11fr 0:b8bade04f24f 151 / number in the path name. _VOLUME_STRS defines the drive ID strings for each
eric11fr 0:b8bade04f24f 152 / logical drives. Number of items must be equal to _VOLUMES. Valid characters for
eric11fr 0:b8bade04f24f 153 / the drive ID strings are: A-Z and 0-9. */
eric11fr 0:b8bade04f24f 154
eric11fr 0:b8bade04f24f 155
eric11fr 0:b8bade04f24f 156 #define _MULTI_PARTITION 0
eric11fr 0:b8bade04f24f 157 /* This option switches multi-partition feature. By default (0), each logical drive
eric11fr 0:b8bade04f24f 158 / number is bound to the same physical drive number and only an FAT volume found on
eric11fr 0:b8bade04f24f 159 / the physical drive will be mounted. When multi-partition feature is enabled (1),
eric11fr 0:b8bade04f24f 160 / each logical drive number is bound to arbitrary physical drive and partition
eric11fr 0:b8bade04f24f 161 / listed in the VolToPart[]. Also f_fdisk() funciton will be available. */
eric11fr 0:b8bade04f24f 162
eric11fr 0:b8bade04f24f 163
eric11fr 0:b8bade04f24f 164 #define _MIN_SS 512
eric11fr 0:b8bade04f24f 165 #define _MAX_SS 512
eric11fr 0:b8bade04f24f 166 /* These options configure the range of sector size to be supported. (512, 1024,
eric11fr 0:b8bade04f24f 167 / 2048 or 4096) Always set both 512 for most systems, all type of memory cards and
eric11fr 0:b8bade04f24f 168 / harddisk. But a larger value may be required for on-board flash memory and some
eric11fr 0:b8bade04f24f 169 / type of optical media. When _MAX_SS is larger than _MIN_SS, FatFs is configured
eric11fr 0:b8bade04f24f 170 / to variable sector size and GET_SECTOR_SIZE command must be implemented to the
eric11fr 0:b8bade04f24f 171 / disk_ioctl() function. */
eric11fr 0:b8bade04f24f 172
eric11fr 0:b8bade04f24f 173
eric11fr 0:b8bade04f24f 174 #define _USE_TRIM 0
eric11fr 0:b8bade04f24f 175 /* This option switches ATA-TRIM feature. (0:Disable or 1:Enable)
eric11fr 0:b8bade04f24f 176 / To enable Trim feature, also CTRL_TRIM command should be implemented to the
eric11fr 0:b8bade04f24f 177 / disk_ioctl() function. */
eric11fr 0:b8bade04f24f 178
eric11fr 0:b8bade04f24f 179
eric11fr 0:b8bade04f24f 180 #define _FS_NOFSINFO 0
eric11fr 0:b8bade04f24f 181 /* If you need to know correct free space on the FAT32 volume, set bit 0 of this
eric11fr 0:b8bade04f24f 182 / option, and f_getfree() function at first time after volume mount will force
eric11fr 0:b8bade04f24f 183 / a full FAT scan. Bit 1 controls the use of last allocated cluster number.
eric11fr 0:b8bade04f24f 184 /
eric11fr 0:b8bade04f24f 185 / bit0=0: Use free cluster count in the FSINFO if available.
eric11fr 0:b8bade04f24f 186 / bit0=1: Do not trust free cluster count in the FSINFO.
eric11fr 0:b8bade04f24f 187 / bit1=0: Use last allocated cluster number in the FSINFO if available.
eric11fr 0:b8bade04f24f 188 / bit1=1: Do not trust last allocated cluster number in the FSINFO.
eric11fr 0:b8bade04f24f 189 */
eric11fr 0:b8bade04f24f 190
eric11fr 0:b8bade04f24f 191
eric11fr 0:b8bade04f24f 192
eric11fr 0:b8bade04f24f 193 /*---------------------------------------------------------------------------/
eric11fr 0:b8bade04f24f 194 / System Configurations
eric11fr 0:b8bade04f24f 195 /---------------------------------------------------------------------------*/
eric11fr 0:b8bade04f24f 196
eric11fr 0:b8bade04f24f 197 #define _FS_TINY 0
eric11fr 0:b8bade04f24f 198 /* This option switches tiny buffer configuration. (0:Normal or 1:Tiny)
eric11fr 0:b8bade04f24f 199 / At the tiny configuration, size of the file object (FIL) is reduced _MAX_SS
eric11fr 0:b8bade04f24f 200 / bytes. Instead of private sector buffer eliminated from the file object,
eric11fr 0:b8bade04f24f 201 / common sector buffer in the file system object (FATFS) is used for the file
eric11fr 0:b8bade04f24f 202 / data transfer. */
eric11fr 0:b8bade04f24f 203
eric11fr 0:b8bade04f24f 204
eric11fr 0:b8bade04f24f 205 #define _FS_NORTC 0
eric11fr 0:b8bade04f24f 206 #define _NORTC_MON 1
eric11fr 0:b8bade04f24f 207 #define _NORTC_MDAY 1
eric11fr 0:b8bade04f24f 208 #define _NORTC_YEAR 2015
eric11fr 0:b8bade04f24f 209 /* The _FS_NORTC option switches timestamp feature. If the system does not have
eric11fr 0:b8bade04f24f 210 / an RTC function or valid timestamp is not needed, set _FS_NORTC to 1 to disable
eric11fr 0:b8bade04f24f 211 / the timestamp feature. All objects modified by FatFs will have a fixed timestamp
eric11fr 0:b8bade04f24f 212 / defined by _NORTC_MON, _NORTC_MDAY and _NORTC_YEAR.
eric11fr 0:b8bade04f24f 213 / When timestamp feature is enabled (_FS_NORTC == 0), get_fattime() function need
eric11fr 0:b8bade04f24f 214 / to be added to the project to read current time form RTC. _NORTC_MON,
eric11fr 0:b8bade04f24f 215 / _NORTC_MDAY and _NORTC_YEAR have no effect.
eric11fr 0:b8bade04f24f 216 / These options have no effect at read-only configuration (_FS_READONLY == 1). */
eric11fr 0:b8bade04f24f 217
eric11fr 0:b8bade04f24f 218
eric11fr 0:b8bade04f24f 219 #define _FS_LOCK 0
eric11fr 0:b8bade04f24f 220 /* The _FS_LOCK option switches file lock feature to control duplicated file open
eric11fr 0:b8bade04f24f 221 / and illegal operation to open objects. This option must be 0 when _FS_READONLY
eric11fr 0:b8bade04f24f 222 / is 1.
eric11fr 0:b8bade04f24f 223 /
eric11fr 0:b8bade04f24f 224 / 0: Disable file lock feature. To avoid volume corruption, application program
eric11fr 0:b8bade04f24f 225 / should avoid illegal open, remove and rename to the open objects.
eric11fr 0:b8bade04f24f 226 / >0: Enable file lock feature. The value defines how many files/sub-directories
eric11fr 0:b8bade04f24f 227 / can be opened simultaneously under file lock control. Note that the file
eric11fr 0:b8bade04f24f 228 / lock feature is independent of re-entrancy. */
eric11fr 0:b8bade04f24f 229
eric11fr 0:b8bade04f24f 230
eric11fr 0:b8bade04f24f 231 #define _FS_REENTRANT 0
eric11fr 0:b8bade04f24f 232 #define _FS_TIMEOUT 1000
eric11fr 0:b8bade04f24f 233 #define _SYNC_t HANDLE
eric11fr 0:b8bade04f24f 234 /* The _FS_REENTRANT option switches the re-entrancy (thread safe) of the FatFs
eric11fr 0:b8bade04f24f 235 / module itself. Note that regardless of this option, file access to different
eric11fr 0:b8bade04f24f 236 / volume is always re-entrant and volume control functions, f_mount(), f_mkfs()
eric11fr 0:b8bade04f24f 237 / and f_fdisk() function, are always not re-entrant. Only file/directory access
eric11fr 0:b8bade04f24f 238 / to the same volume is under control of this feature.
eric11fr 0:b8bade04f24f 239 /
eric11fr 0:b8bade04f24f 240 / 0: Disable re-entrancy. _FS_TIMEOUT and _SYNC_t have no effect.
eric11fr 0:b8bade04f24f 241 / 1: Enable re-entrancy. Also user provided synchronization handlers,
eric11fr 0:b8bade04f24f 242 / ff_req_grant(), ff_rel_grant(), ff_del_syncobj() and ff_cre_syncobj()
eric11fr 0:b8bade04f24f 243 / function, must be added to the project. Samples are available in
eric11fr 0:b8bade04f24f 244 / option/syscall.c.
eric11fr 0:b8bade04f24f 245 /
eric11fr 0:b8bade04f24f 246 / The _FS_TIMEOUT defines timeout period in unit of time tick.
eric11fr 0:b8bade04f24f 247 / The _SYNC_t defines O/S dependent sync object type. e.g. HANDLE, ID, OS_EVENT*,
eric11fr 0:b8bade04f24f 248 / SemaphoreHandle_t and etc.. A header file for O/S definitions needs to be
eric11fr 0:b8bade04f24f 249 / included somewhere in the scope of ff.c. */
eric11fr 0:b8bade04f24f 250
eric11fr 0:b8bade04f24f 251
eric11fr 0:b8bade04f24f 252 #define _WORD_ACCESS 0
eric11fr 0:b8bade04f24f 253 /* The _WORD_ACCESS option is an only platform dependent option. It defines
eric11fr 0:b8bade04f24f 254 / which access method is used to the word data on the FAT volume.
eric11fr 0:b8bade04f24f 255 /
eric11fr 0:b8bade04f24f 256 / 0: Byte-by-byte access. Always compatible with all platforms.
eric11fr 0:b8bade04f24f 257 / 1: Word access. Do not choose this unless under both the following conditions.
eric11fr 0:b8bade04f24f 258 /
eric11fr 0:b8bade04f24f 259 / * Address misaligned memory access is always allowed to ALL instructions.
eric11fr 0:b8bade04f24f 260 / * Byte order on the memory is little-endian.
eric11fr 0:b8bade04f24f 261 /
eric11fr 0:b8bade04f24f 262 / If it is the case, _WORD_ACCESS can also be set to 1 to reduce code size.
eric11fr 0:b8bade04f24f 263 / Following table shows allowable settings of some type of processors.
eric11fr 0:b8bade04f24f 264 /
eric11fr 0:b8bade04f24f 265 / ARM7TDMI 0 *2 ColdFire 0 *1 V850E 0 *2
eric11fr 0:b8bade04f24f 266 / Cortex-M3 0 *3 Z80 0/1 V850ES 0/1
eric11fr 0:b8bade04f24f 267 / Cortex-M0 0 *2 x86 0/1 TLCS-870 0/1
eric11fr 0:b8bade04f24f 268 / AVR 0/1 RX600(LE) 0/1 TLCS-900 0/1
eric11fr 0:b8bade04f24f 269 / AVR32 0 *1 RL78 0 *2 R32C 0 *2
eric11fr 0:b8bade04f24f 270 / PIC18 0/1 SH-2 0 *1 M16C 0/1
eric11fr 0:b8bade04f24f 271 / PIC24 0 *2 H8S 0 *1 MSP430 0 *2
eric11fr 0:b8bade04f24f 272 / PIC32 0 *1 H8/300H 0 *1 8051 0/1
eric11fr 0:b8bade04f24f 273 /
eric11fr 0:b8bade04f24f 274 / *1:Big-endian.
eric11fr 0:b8bade04f24f 275 / *2:Unaligned memory access is not supported.
eric11fr 0:b8bade04f24f 276 / *3:Some compilers generate LDM/STM for mem_cpy function.
eric11fr 0:b8bade04f24f 277 */
eric11fr 0:b8bade04f24f 278
eric11fr 0:b8bade04f24f 279 #define FLUSH_ON_NEW_CLUSTER 0 /* Sync the file on every new cluster */
eric11fr 0:b8bade04f24f 280 #define FLUSH_ON_NEW_SECTOR 1 /* Sync the file on every new sector */
eric11fr 0:b8bade04f24f 281 /* Only one of these two defines needs to be set to 1. If both are set to 0
eric11fr 0:b8bade04f24f 282 the file is only sync when closed.
eric11fr 0:b8bade04f24f 283 Clusters are group of sectors (eg: 8 sectors). Flushing on new cluster means
eric11fr 0:b8bade04f24f 284 it would be less often than flushing on new sector. Sectors are generally
eric11fr 0:b8bade04f24f 285 512 Bytes long. */