SAMV71 Xplained Ultra Software Package 1.5

conf_fatfs.h

Go to the documentation of this file.
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  * Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
00036  */
00037 
00038 #ifndef CONF_FATFS_H_INCLUDED
00039 #define CONF_FATFS_H_INCLUDED
00040 
00041 /*---------------------------------------------------------------------------/
00042 /  FatFs - FAT file system module configuration file  R0.09  (C)ChaN, 2011
00043 /----------------------------------------------------------------------------/
00044 /
00045 / CAUTION! Do not forget to make clean the project after any changes to
00046 / the configuration options.
00047 /
00048 /----------------------------------------------------------------------------*/
00049 #ifndef _FFCONF
00050     #define _FFCONF 6502    /* Revision ID */
00051 
00052 
00053     /*---------------------------------------------------------------------------/
00054     / Functions and Buffer Configurations
00055     /----------------------------------------------------------------------------*/
00056 
00057     #define    _FS_TINY        0    /* 0:Normal or 1:Tiny */
00058     /* When _FS_TINY is set to 1, FatFs uses the sector buffer in the file system
00059     /  object instead of the sector buffer in the individual file object for file
00060     /  data transfer. This reduces memory consumption 512 bytes each file object. */
00061 
00062 
00063     #define _FS_READONLY    0    /* 0:Read/Write or 1:Read only */
00064     /* Setting _FS_READONLY to 1 defines read only configuration. This removes
00065     /  writing functions, f_write, f_sync, f_unlink, f_mkdir, f_chmod, f_rename,
00066     /  f_truncate and useless f_getfree. */
00067 
00068 
00069     #define _FS_MINIMIZE    0    /* 0 to 3 */
00070     /* The _FS_MINIMIZE option defines minimization level to remove some functions.
00071     /
00072     /   0: Full function.
00073     /   1: f_stat, f_getfree, f_unlink, f_mkdir, f_chmod, f_truncate and f_rename
00074     /      are removed.
00075     /   2: f_opendir and f_readdir are removed in addition to 1.
00076     /   3: f_lseek is removed in addition to 2. */
00077 
00078 
00079     #define    _USE_STRFUNC    1    /* 0:Disable or 1-2:Enable */
00080     /* To enable string functions, set _USE_STRFUNC to 1 or 2. */
00081 
00082 
00083     #define    _USE_MKFS    1        /* 0:Disable or 1:Enable */
00084     /* To enable f_mkfs function, set _USE_MKFS to 1 and set _FS_READONLY to 0 */
00085 
00086 
00087     #define    _USE_FORWARD    0    /* 0:Disable or 1:Enable */
00088     /* To enable f_forward function, set _USE_FORWARD to 1 and set _FS_TINY to 1. */
00089 
00090 
00091     #define    _USE_FASTSEEK    0    /* 0:Disable or 1:Enable */
00092     /* To enable fast seek feature, set _USE_FASTSEEK to 1. */
00093 
00094 
00095 
00096     /*---------------------------------------------------------------------------/
00097     / Locale and Namespace Configurations
00098     /----------------------------------------------------------------------------*/
00099 
00100     #define _CODE_PAGE    850
00101     /* The _CODE_PAGE specifies the OEM code page to be used on the target system.
00102     /  Incorrect setting of the code page can cause a file open failure.
00103     /
00104     /   932  - Japanese Shift-JIS (DBCS, OEM, Windows)
00105     /   936  - Simplified Chinese GBK (DBCS, OEM, Windows)
00106     /   949  - Korean (DBCS, OEM, Windows)
00107     /   950  - Traditional Chinese Big5 (DBCS, OEM, Windows)
00108     /   1250 - Central Europe (Windows)
00109     /   1251 - Cyrillic (Windows)
00110     /   1252 - Latin 1 (Windows)
00111     /   1253 - Greek (Windows)
00112     /   1254 - Turkish (Windows)
00113     /   1255 - Hebrew (Windows)
00114     /   1256 - Arabic (Windows)
00115     /   1257 - Baltic (Windows)
00116     /   1258 - Vietnam (OEM, Windows)
00117     /   437  - U.S. (OEM)
00118     /   720  - Arabic (OEM)
00119     /   737  - Greek (OEM)
00120     /   775  - Baltic (OEM)
00121     /   850  - Multilingual Latin 1 (OEM)
00122     /   858  - Multilingual Latin 1 + Euro (OEM)
00123     /   852  - Latin 2 (OEM)
00124     /   855  - Cyrillic (OEM)
00125     /   866  - Russian (OEM)
00126     /   857  - Turkish (OEM)
00127     /   862  - Hebrew (OEM)
00128     /   874  - Thai (OEM, Windows)
00129     /    1    - ASCII only (Valid for non LFN cfg.)
00130     */
00131 
00132 
00133     #define    _USE_LFN    2        /* 0 to 3 */
00134     #define    _MAX_LFN    255        /* Maximum LFN length to handle (12 to 255) */
00135     /* The _USE_LFN option switches the LFN support.
00136     /
00137     /   0: Disable LFN feature. _MAX_LFN and _LFN_UNICODE have no effect.
00138     /   1: Enable LFN with static working buffer on the BSS. Always NOT reentrant.
00139     /   2: Enable LFN with dynamic working buffer on the STACK.
00140     /   3: Enable LFN with dynamic working buffer on the HEAP.
00141     /
00142     /  The LFN working buffer occupies (_MAX_LFN + 1) * 2 bytes. To enable LFN,
00143     /  Unicode handling functions ff_convert() and ff_wtoupper() must be added
00144     /  to the project. When enable to use heap, memory control functions
00145     /  ff_memalloc() and ff_memfree() must be added to the project. */
00146 
00147 
00148     #define    _LFN_UNICODE    0    /* 0:ANSI/OEM or 1:Unicode */
00149     /* To switch the character code set on FatFs API to Unicode,
00150     /  enable LFN feature and set _LFN_UNICODE to 1. */
00151 
00152 
00153     #define _FS_RPATH        0    /* 0 to 2 */
00154     /* The _FS_RPATH option configures relative path feature.
00155     /
00156     /   0: Disable relative path feature and remove related functions.
00157     /   1: Enable relative path. f_chdrive() and f_chdir() are available.
00158     /   2: f_getcwd() is available in addition to 1.
00159     /
00160     /  Note that output of the f_readdir function is affected by this option. */
00161 
00162 
00163 
00164     /*---------------------------------------------------------------------------/
00165     / Physical Drive Configurations
00166     /----------------------------------------------------------------------------*/
00167 
00168     #define    _VOLUMES       8
00169     /* Number of volumes (logical drives) to be used. */
00170 
00171 
00172     #define    _MAX_SS        512        /* 512, 1024, 2048 or 4096 */
00173     /* Maximum sector size to be handled.
00174     /  Always set 512 for memory card and hard disk but a larger value may be
00175     /  required for on-board flash memory, floppy disk and optical disk.
00176     /  When _MAX_SS is larger than 512, it configures FatFs to variable sector size
00177     /  and GET_SECTOR_SIZE command must be implemented to the disk_ioctl function. */
00178 
00179 
00180     #define    _MULTI_PARTITION    0    /* 0:Single partition, 1/2:Enable multiple partition */
00181     /* When set to 0, each volume is bound to the same physical drive number and
00182     / it can mount only first primary partition. When it is set to 1, each volume
00183     / is tied to the partitions listed in VolToPart[]. */
00184 
00185 
00186     #define    _USE_ERASE    0    /* 0:Disable or 1:Enable */
00187     /* To enable sector erase feature, set _USE_ERASE to 1. CTRL_ERASE_SECTOR command
00188     /  should be added to the disk_ioctl function. */
00189 
00190 
00191 
00192     /*---------------------------------------------------------------------------/
00193     / System Configurations
00194     /----------------------------------------------------------------------------*/
00195 
00196     #define _WORD_ACCESS    0    /* 0 or 1 */
00197     /* Set 0 first and it is always compatible with all platforms. The _WORD_ACCESS
00198     /  option defines which access method is used to the word data on the FAT volume.
00199     /
00200     /   0: Byte-by-byte access.
00201     /   1: Word access. Do not choose this unless the following condition is met.
00202     /
00203     /  When the byte order on the memory is big-endian or address miss-aligned word
00204     /  access results incorrect behavior, the _WORD_ACCESS must be set to 0.
00205     /  If it is not the case, the value can also be set to 1 to improve the
00206     /  performance and code size.
00207     */
00208 
00209 
00210     /* A header file that defines sync object types on the O/S, such as
00211     /  windows.h, ucos_ii.h and semphr.h, must be included prior to ff.h. */
00212 
00213     #define _FS_REENTRANT    0        /* 0:Disable or 1:Enable */
00214     #define _FS_TIMEOUT        1000    /* Timeout period in unit of time ticks */
00215     #define    _SYNC_t            HANDLE    /* O/S dependent type of sync object. e.g. HANDLE, OS_EVENT*, ID and etc.. */
00216 
00217     /* The _FS_REENTRANT option switches the reentrancy (thread safe) of the FatFs module.
00218     /
00219     /   0: Disable reentrancy. _SYNC_t and _FS_TIMEOUT have no effect.
00220     /   1: Enable reentrancy. Also user provided synchronization handlers,
00221     /      ff_req_grant, ff_rel_grant, ff_del_syncobj and ff_cre_syncobj
00222     /      functions must be added to the project. */
00223 
00224 
00225     #define    _FS_SHARE    0    /* 0:Disable or >=1:Enable */
00226     /* To enable file sharing feature, set _FS_SHARE to 1 or greater. The value
00227     defines how many files can be opened simultaneously. */
00228 
00229 #endif /* _FFCONF */
00230 
00231 #endif /* CONF_FATFS_H_INCLUDED */
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines