00001 /* ---------------------------------------------------------------------------- */ 00002 /* Atmel Microcontroller Software Support */ 00003 /* SAM Software Package License */ 00004 /* ---------------------------------------------------------------------------- */ 00005 /* Copyright (c) 2015, Atmel Corporation */ 00006 /* */ 00007 /* All rights reserved. */ 00008 /* */ 00009 /* Redistribution and use in source and binary forms, with or without */ 00010 /* modification, are permitted provided that the following condition is met: */ 00011 /* */ 00012 /* - Redistributions of source code must retain the above copyright notice, */ 00013 /* this list of conditions and the disclaimer below. */ 00014 /* */ 00015 /* Atmel's name may not be used to endorse or promote products derived from */ 00016 /* this software without specific prior written permission. */ 00017 /* */ 00018 /* DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR */ 00019 /* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ 00020 /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE */ 00021 /* DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, */ 00022 /* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */ 00023 /* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, */ 00024 /* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ 00025 /* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */ 00026 /* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, */ 00027 /* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 00028 /* ---------------------------------------------------------------------------- */ 00029 /** 00030 * \file 00031 * 00032 * \brief FATFS configuration file. 00033 * 00034 */ 00035 /* 00036 * Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> 00037 */ 00038 00039 #ifndef CONF_FATFS_H_INCLUDED 00040 #define CONF_FATFS_H_INCLUDED 00041 00042 /*---------------------------------------------------------------------------/ 00043 / FatFs - FAT file system module configuration file R0.09 (C)ChaN, 2011 00044 /----------------------------------------------------------------------------/ 00045 / 00046 / CAUTION! Do not forget to make clean the project after any changes to 00047 / the configuration options. 00048 / 00049 /----------------------------------------------------------------------------*/ 00050 #ifndef _FFCONF 00051 #define _FFCONF 6502 /* Revision ID */ 00052 00053 00054 /*---------------------------------------------------------------------------/ 00055 / Functions and Buffer Configurations 00056 /----------------------------------------------------------------------------*/ 00057 00058 #define _FS_TINY 0 /* 0:Normal or 1:Tiny */ 00059 /* When _FS_TINY is set to 1, FatFs uses the sector buffer in the file system 00060 / object instead of the sector buffer in the individual file object for file 00061 / data transfer. This reduces memory consumption 512 bytes each file object. */ 00062 00063 00064 #define _FS_READONLY 0 /* 0:Read/Write or 1:Read only */ 00065 /* Setting _FS_READONLY to 1 defines read only configuration. This removes 00066 / writing functions, f_write, f_sync, f_unlink, f_mkdir, f_chmod, f_rename, 00067 / f_truncate and useless f_getfree. */ 00068 00069 00070 #define _FS_MINIMIZE 0 /* 0 to 3 */ 00071 /* The _FS_MINIMIZE option defines minimization level to remove some functions. 00072 / 00073 / 0: Full function. 00074 / 1: f_stat, f_getfree, f_unlink, f_mkdir, f_chmod, f_truncate and f_rename 00075 / are removed. 00076 / 2: f_opendir and f_readdir are removed in addition to 1. 00077 / 3: f_lseek is removed in addition to 2. */ 00078 00079 00080 #define _USE_STRFUNC 1 /* 0:Disable or 1-2:Enable */ 00081 /* To enable string functions, set _USE_STRFUNC to 1 or 2. */ 00082 00083 00084 #define _USE_MKFS 1 /* 0:Disable or 1:Enable */ 00085 /* To enable f_mkfs function, set _USE_MKFS to 1 and set _FS_READONLY to 0 */ 00086 00087 00088 #define _USE_FORWARD 0 /* 0:Disable or 1:Enable */ 00089 /* To enable f_forward function, set _USE_FORWARD to 1 and set _FS_TINY to 1. */ 00090 00091 00092 #define _USE_FASTSEEK 0 /* 0:Disable or 1:Enable */ 00093 /* To enable fast seek feature, set _USE_FASTSEEK to 1. */ 00094 00095 00096 00097 /*---------------------------------------------------------------------------/ 00098 / Locale and Namespace Configurations 00099 /----------------------------------------------------------------------------*/ 00100 00101 #define _CODE_PAGE 850 00102 /* The _CODE_PAGE specifies the OEM code page to be used on the target system. 00103 / Incorrect setting of the code page can cause a file open failure. 00104 / 00105 / 932 - Japanese Shift-JIS (DBCS, OEM, Windows) 00106 / 936 - Simplified Chinese GBK (DBCS, OEM, Windows) 00107 / 949 - Korean (DBCS, OEM, Windows) 00108 / 950 - Traditional Chinese Big5 (DBCS, OEM, Windows) 00109 / 1250 - Central Europe (Windows) 00110 / 1251 - Cyrillic (Windows) 00111 / 1252 - Latin 1 (Windows) 00112 / 1253 - Greek (Windows) 00113 / 1254 - Turkish (Windows) 00114 / 1255 - Hebrew (Windows) 00115 / 1256 - Arabic (Windows) 00116 / 1257 - Baltic (Windows) 00117 / 1258 - Vietnam (OEM, Windows) 00118 / 437 - U.S. (OEM) 00119 / 720 - Arabic (OEM) 00120 / 737 - Greek (OEM) 00121 / 775 - Baltic (OEM) 00122 / 850 - Multilingual Latin 1 (OEM) 00123 / 858 - Multilingual Latin 1 + Euro (OEM) 00124 / 852 - Latin 2 (OEM) 00125 / 855 - Cyrillic (OEM) 00126 / 866 - Russian (OEM) 00127 / 857 - Turkish (OEM) 00128 / 862 - Hebrew (OEM) 00129 / 874 - Thai (OEM, Windows) 00130 / 1 - ASCII only (Valid for non LFN cfg.) 00131 */ 00132 00133 00134 #define _USE_LFN 2 /* 0 to 3 */ 00135 #define _MAX_LFN 255 /* Maximum LFN length to handle (12 to 255) */ 00136 /* The _USE_LFN option switches the LFN support. 00137 / 00138 / 0: Disable LFN feature. _MAX_LFN and _LFN_UNICODE have no effect. 00139 / 1: Enable LFN with static working buffer on the BSS. Always NOT reentrant. 00140 / 2: Enable LFN with dynamic working buffer on the STACK. 00141 / 3: Enable LFN with dynamic working buffer on the HEAP. 00142 / 00143 / The LFN working buffer occupies (_MAX_LFN + 1) * 2 bytes. To enable LFN, 00144 / Unicode handling functions ff_convert() and ff_wtoupper() must be added 00145 / to the project. When enable to use heap, memory control functions 00146 / ff_memalloc() and ff_memfree() must be added to the project. */ 00147 00148 00149 #define _LFN_UNICODE 0 /* 0:ANSI/OEM or 1:Unicode */ 00150 /* To switch the character code set on FatFs API to Unicode, 00151 / enable LFN feature and set _LFN_UNICODE to 1. */ 00152 00153 00154 #define _FS_RPATH 0 /* 0 to 2 */ 00155 /* The _FS_RPATH option configures relative path feature. 00156 / 00157 / 0: Disable relative path feature and remove related functions. 00158 / 1: Enable relative path. f_chdrive() and f_chdir() are available. 00159 / 2: f_getcwd() is available in addition to 1. 00160 / 00161 / Note that output of the f_readdir function is affected by this option. */ 00162 00163 00164 00165 /*---------------------------------------------------------------------------/ 00166 / Physical Drive Configurations 00167 /----------------------------------------------------------------------------*/ 00168 00169 #define _VOLUMES 8 00170 /* Number of volumes (logical drives) to be used. */ 00171 00172 00173 #define _MAX_SS 512 /* 512, 1024, 2048 or 4096 */ 00174 /* Maximum sector size to be handled. 00175 / Always set 512 for memory card and hard disk but a larger value may be 00176 / required for on-board flash memory, floppy disk and optical disk. 00177 / When _MAX_SS is larger than 512, it configures FatFs to variable sector size 00178 / and GET_SECTOR_SIZE command must be implemented to the disk_ioctl function. */ 00179 00180 00181 #define _MULTI_PARTITION 0 /* 0:Single partition, 1/2:Enable multiple partition */ 00182 /* When set to 0, each volume is bound to the same physical drive number and 00183 / it can mount only first primary partition. When it is set to 1, each volume 00184 / is tied to the partitions listed in VolToPart[]. */ 00185 00186 00187 #define _USE_ERASE 0 /* 0:Disable or 1:Enable */ 00188 /* To enable sector erase feature, set _USE_ERASE to 1. CTRL_ERASE_SECTOR command 00189 / should be added to the disk_ioctl function. */ 00190 00191 00192 00193 /*---------------------------------------------------------------------------/ 00194 / System Configurations 00195 /----------------------------------------------------------------------------*/ 00196 00197 #define _WORD_ACCESS 0 /* 0 or 1 */ 00198 /* Set 0 first and it is always compatible with all platforms. The _WORD_ACCESS 00199 / option defines which access method is used to the word data on the FAT volume. 00200 / 00201 / 0: Byte-by-byte access. 00202 / 1: Word access. Do not choose this unless the following condition is met. 00203 / 00204 / When the byte order on the memory is big-endian or address miss-aligned word 00205 / access results incorrect behavior, the _WORD_ACCESS must be set to 0. 00206 / If it is not the case, the value can also be set to 1 to improve the 00207 / performance and code size. 00208 */ 00209 00210 00211 /* A header file that defines sync object types on the O/S, such as 00212 / windows.h, ucos_ii.h and semphr.h, must be included prior to ff.h. */ 00213 00214 #define _FS_REENTRANT 0 /* 0:Disable or 1:Enable */ 00215 #define _FS_TIMEOUT 1000 /* Timeout period in unit of time ticks */ 00216 #define _SYNC_t HANDLE /* O/S dependent type of sync object. e.g. HANDLE, OS_EVENT*, ID and etc.. */ 00217 00218 /* The _FS_REENTRANT option switches the reentrancy (thread safe) of the FatFs module. 00219 / 00220 / 0: Disable reentrancy. _SYNC_t and _FS_TIMEOUT have no effect. 00221 / 1: Enable reentrancy. Also user provided synchronization handlers, 00222 / ff_req_grant, ff_rel_grant, ff_del_syncobj and ff_cre_syncobj 00223 / functions must be added to the project. */ 00224 00225 00226 #define _FS_SHARE 0 /* 0:Disable or >=1:Enable */ 00227 /* To enable file sharing feature, set _FS_SHARE to 1 or greater. The value 00228 defines how many files can be opened simultaneously. */ 00229 00230 #endif /* _FFCONF */ 00231 00232 #endif /* CONF_FATFS_H_INCLUDED */