WILLY BAYOT / stm32_adafruit

Dependents:   TDEMNucleo

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers ffconf.h Source File

ffconf.h

00001 /*---------------------------------------------------------------------------/
00002 /  FatFs - FAT file system module configuration file  R0.10  (C)ChaN, 2013
00003 /----------------------------------------------------------------------------/
00004 /
00005 / CAUTION! Do not forget to make clean the project after any changes to
00006 / the configuration options.
00007 /
00008 /----------------------------------------------------------------------------*/
00009 #ifndef _FFCONF
00010 #define _FFCONF 80960 /* Revision ID */
00011 
00012 /*-----------------------------------------------------------------------------/
00013 / Additional user header to be used  
00014 /-----------------------------------------------------------------------------*/
00015 #include "stm32f4xx_hal.h"
00016 #include "stm32_adafruit_sd.h"
00017 
00018 
00019 /*-----------------------------------------------------------------------------/
00020 / Functions and Buffer Configurations
00021 /-----------------------------------------------------------------------------*/
00022 
00023 #define _FS_TINY             0      /* 0:Normal or 1:Tiny */
00024 /* When _FS_TINY is set to 1, FatFs uses the sector buffer in the file system
00025 /  object instead of the sector buffer in the individual file object for file
00026 /  data transfer. This reduces memory consumption 512 bytes each file object. */
00027 
00028 
00029 #define _FS_READONLY         0      /* 0:Read/Write or 1:Read only */
00030 /* Setting _FS_READONLY to 1 defines read only configuration. This removes
00031 /  writing functions, f_write, f_sync, f_unlink, f_mkdir, f_chmod, f_rename,
00032 /  f_truncate and useless f_getfree. */
00033 
00034 
00035 #define _FS_MINIMIZE         0      /* 0 to 3 */
00036 /* The _FS_MINIMIZE option defines minimization level to remove some functions.
00037 /
00038 /   0: Full function.
00039 /   1: f_stat, f_getfree, f_unlink, f_mkdir, f_chmod, f_truncate, f_utime 
00040 /      and f_rename are removed.
00041 /   2: f_opendir and f_readdir are removed in addition to 1.
00042 /   3: f_lseek is removed in addition to 2. */
00043 
00044 
00045 #define _USE_STRFUNC         2      /* 0:Disable or 1-2:Enable */
00046 /* To enable string functions, set _USE_STRFUNC to 1 or 2. */
00047 
00048 
00049 #define _USE_MKFS            1      /* 0:Disable or 1:Enable */
00050 /* To enable f_mkfs function, set _USE_MKFS to 1 and set _FS_READONLY to 0 */
00051 
00052 
00053 #define _USE_FASTSEEK        1      /* 0:Disable or 1:Enable */
00054 /* To enable fast seek feature, set _USE_FASTSEEK to 1. */
00055 
00056 
00057 #define _USE_LABEL           0      /* 0:Disable or 1:Enable */
00058 /* To enable volume label functions, set _USE_LAVEL to 1 */
00059 
00060 
00061 #define _USE_FORWARD         0      /* 0:Disable or 1:Enable */
00062 /* To enable f_forward function, set _USE_FORWARD to 1 and set _FS_TINY to 1. */
00063 
00064 
00065 /*-----------------------------------------------------------------------------/
00066 / Local and Namespace Configurations
00067 /-----------------------------------------------------------------------------*/
00068 
00069 #define _CODE_PAGE         1252
00070 /* The _CODE_PAGE specifies the OEM code page to be used on the target system.
00071 /  Incorrect setting of the code page can cause a file open failure.
00072 /
00073 /   932  - Japanese Shift-JIS (DBCS, OEM, Windows)
00074 /   936  - Simplified Chinese GBK (DBCS, OEM, Windows)
00075 /   949  - Korean (DBCS, OEM, Windows)
00076 /   950  - Traditional Chinese Big5 (DBCS, OEM, Windows)
00077 /   1250 - Central Europe (Windows)
00078 /   1251 - Cyrillic (Windows)
00079 /   1252 - Latin 1 (Windows)
00080 /   1253 - Greek (Windows)
00081 /   1254 - Turkish (Windows)
00082 /   1255 - Hebrew (Windows)
00083 /   1256 - Arabic (Windows)
00084 /   1257 - Baltic (Windows)
00085 /   1258 - Vietnam (OEM, Windows)
00086 /   437  - U.S. (OEM)
00087 /   720  - Arabic (OEM)
00088 /   737  - Greek (OEM)
00089 /   775  - Baltic (OEM)
00090 /   850  - Multilingual Latin 1 (OEM)
00091 /   858  - Multilingual Latin 1 + Euro (OEM)
00092 /   852  - Latin 2 (OEM)
00093 /   855  - Cyrillic (OEM)
00094 /   866  - Russian (OEM)
00095 /   857  - Turkish (OEM)
00096 /   862  - Hebrew (OEM)
00097 /   874  - Thai (OEM, Windows)
00098 / 1    - ASCII only (Valid for non LFN cfg.)
00099 */
00100 
00101 
00102 #define _USE_LFN     0  /* 0 to 3 */
00103 #define _MAX_LFN     255  /* Maximum LFN length to handle (12 to 255) */
00104 /* The _USE_LFN option switches the LFN feature.
00105 /
00106 /   0: Disable LFN feature. _MAX_LFN has no effect.
00107 /   1: Enable LFN with static working buffer on the BSS. Always NOT reentrant.
00108 /   2: Enable LFN with dynamic working buffer on the STACK.
00109 /   3: Enable LFN with dynamic working buffer on the HEAP.
00110 /
00111 /  To enable LFN feature, Unicode handling functions ff_convert() and ff_wtoupper()
00112 /  function must be added to the project.
00113 /  The LFN working buffer occupies (_MAX_LFN + 1) * 2 bytes. When use stack for the
00114 /  working buffer, take care on stack overflow. When use heap memory for the working
00115 /  buffer, memory management functions, ff_memalloc() and ff_memfree(), must be added
00116 /  to the project. */
00117 
00118 
00119 #define _LFN_UNICODE    0 /* 0:ANSI/OEM or 1:Unicode */
00120 /* To switch the character encoding on the FatFs API to Unicode, enable LFN feature
00121 /  and set _LFN_UNICODE to 1. */
00122 
00123 
00124 #define _STRF_ENCODE    3 /* 0:ANSI/OEM, 1:UTF-16LE, 2:UTF-16BE, 3:UTF-8 */
00125 /* When Unicode API is enabled, character encoding on the all FatFs API is switched
00126 /  to Unicode. This option selects the character encoding on the file to be read/written
00127 /  via string functions, f_gets(), f_putc(), f_puts and f_printf().
00128 /  This option has no effect when _LFN_UNICODE is 0. */
00129 
00130 
00131 #define _FS_RPATH       0 /* 0 to 2 */
00132 /* The _FS_RPATH option configures relative path feature.
00133 /
00134 /   0: Disable relative path feature and remove related functions.
00135 /   1: Enable relative path. f_chdrive() and f_chdir() function are available.
00136 /   2: f_getcwd() function is available in addition to 1.
00137 /
00138 /  Note that output of the f_readdir() fnction is affected by this option. */
00139 
00140 
00141 /*---------------------------------------------------------------------------/
00142 / Drive/Volume Configurations
00143 /----------------------------------------------------------------------------*/
00144 
00145 #define _VOLUMES    1
00146 /* Number of volumes (logical drives) to be used. */
00147 
00148 
00149 #define _MULTI_PARTITION     0 /* 0:Single partition, 1:Enable multiple partition */
00150 /* When set to 0, each volume is bound to the same physical drive number and
00151 / it can mount only first primaly partition. When it is set to 1, each volume
00152 / is tied to the partitions listed in VolToPart[]. */
00153 
00154 
00155 #define _MAX_SS    512  /* 512, 1024, 2048 or 4096 */
00156 /* Maximum sector size to be handled.
00157 /  Always set 512 for memory card and hard disk but a larger value may be
00158 /  required for on-board flash memory, floppy disk and optical disk.
00159 /  When _MAX_SS is larger than 512, it configures FatFs to variable sector size
00160 /  and GET_SECTOR_SIZE command must be implemented to the disk_ioctl() function. */
00161 
00162 
00163 #define _USE_ERASE     0 /* 0:Disable or 1:Enable */
00164 /* To enable sector erase feature, set _USE_ERASE to 1. Also CTRL_ERASE_SECTOR command
00165 /  should be added to the disk_ioctl() function. */
00166 
00167 
00168 #define _FS_NOFSINFO    0 /* 0 or 1 */
00169 /* If you need to know the correct free space on the FAT32 volume, set this
00170 /  option to 1 and f_getfree() function at first time after volume mount will
00171 /  force a full FAT scan.
00172 /
00173 /  0: Load all informations in the FSINFO if available.
00174 /  1: Do not trust free cluster count in the FSINFO.
00175 */
00176 
00177 
00178 /*---------------------------------------------------------------------------/
00179 / System Configurations
00180 /----------------------------------------------------------------------------*/
00181 
00182 #define _WORD_ACCESS    0 /* 0 or 1 */
00183 /* The _WORD_ACCESS option is an only platform dependent option. It defines
00184 /  which access method is used to the word data on the FAT volume.
00185 /
00186 /   0: Byte-by-byte access. Always compatible with all platforms.
00187 /   1: Word access. Do not choose this unless under both the following conditions.
00188 /
00189 /  * Byte order on the memory is little-endian.
00190 /  * Address miss-aligned word access is always allowed for all instructions.
00191 /
00192 /  If it is the case, _WORD_ACCESS can also be set to 1 to improve performance
00193 /  and reduce code size.
00194 */
00195 
00196 
00197 /* A header file that defines sync object types on the O/S, such as
00198 /  windows.h, ucos_ii.h and semphr.h, must be included prior to ff.h. */
00199 
00200 #define _FS_REENTRANT    0  /* 0:Disable or 1:Enable */
00201 #define _FS_TIMEOUT      1000 /* Timeout period in unit of time ticks */
00202 #define _SYNC_t          0 /* O/S dependent type of sync object. e.g. HANDLE, OS_EVENT*, ID and etc.. */
00203 
00204 /* The _FS_REENTRANT option switches the re-entrancy (thread safe) of the FatFs module.
00205 /
00206 /   0: Disable re-entrancy. _SYNC_t and _FS_TIMEOUT have no effect.
00207 /   1: Enable re-entrancy. Also user provided synchronization handlers,
00208 /      ff_req_grant(), ff_rel_grant(), ff_del_syncobj() and ff_cre_syncobj()
00209 /      function must be added to the project. */
00210 
00211 
00212 #define _FS_LOCK    12      /* 0:Disable or >=1:Enable */
00213 /* To enable file lock control feature, set _FS_LOCK to 1 or greater.
00214    The value defines how many files can be opened simultaneously. */
00215 
00216 
00217 #endif /* _FFCONFIG */
00218