SAMV71 Xplained Ultra Software Package 1.3

conf_fatfs.h

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