this repository aim to make the official ST DISCO F746NG demo from STM32Cube_FW_F7_V1.2.0 working on mbed.
Dependencies: BSP_DISCO_F746NG_patch mbed-rtos mbed
Config/ffconf.h@0:c00e6c923941, 2015-11-02 (annotated)
- Committer:
- NirT
- Date:
- Mon Nov 02 23:38:08 2015 +0000
- Revision:
- 0:c00e6c923941
Error: Incomplete type is not allowed in "patch/LwIP/src/include/lwip/dhcp.h", Line: 83, Col: 4; ; and more like this.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
NirT | 0:c00e6c923941 | 1 | /*---------------------------------------------------------------------------/ |
NirT | 0:c00e6c923941 | 2 | / FatFs - FAT file system module configuration file R0.11 (C)ChaN, 2015 |
NirT | 0:c00e6c923941 | 3 | /----------------------------------------------------------------------------/ |
NirT | 0:c00e6c923941 | 4 | / |
NirT | 0:c00e6c923941 | 5 | / CAUTION! Do not forget to make clean the project after any changes to |
NirT | 0:c00e6c923941 | 6 | / the configuration options. |
NirT | 0:c00e6c923941 | 7 | / |
NirT | 0:c00e6c923941 | 8 | /----------------------------------------------------------------------------*/ |
NirT | 0:c00e6c923941 | 9 | #ifndef _FFCONF |
NirT | 0:c00e6c923941 | 10 | #define _FFCONF 32020 /* Revision ID */ |
NirT | 0:c00e6c923941 | 11 | |
NirT | 0:c00e6c923941 | 12 | /*-----------------------------------------------------------------------------/ |
NirT | 0:c00e6c923941 | 13 | / Additional user header to be used |
NirT | 0:c00e6c923941 | 14 | /-----------------------------------------------------------------------------*/ |
NirT | 0:c00e6c923941 | 15 | #include "stm32f7xx_hal.h" |
NirT | 0:c00e6c923941 | 16 | #include "stm32746g_discovery_sd.h" |
NirT | 0:c00e6c923941 | 17 | #include "usbh_core.h" |
NirT | 0:c00e6c923941 | 18 | #include "usbh_msc.h" |
NirT | 0:c00e6c923941 | 19 | #define HOST_HANDLE hUSB_Host |
NirT | 0:c00e6c923941 | 20 | |
NirT | 0:c00e6c923941 | 21 | /*-----------------------------------------------------------------------------/ |
NirT | 0:c00e6c923941 | 22 | / Functions and Buffer Configurations |
NirT | 0:c00e6c923941 | 23 | /-----------------------------------------------------------------------------*/ |
NirT | 0:c00e6c923941 | 24 | |
NirT | 0:c00e6c923941 | 25 | #define _FS_TINY 0 /* 0:Normal or 1:Tiny */ |
NirT | 0:c00e6c923941 | 26 | /* When _FS_TINY is set to 1, FatFs uses the sector buffer in the file system |
NirT | 0:c00e6c923941 | 27 | / object instead of the sector buffer in the individual file object for file |
NirT | 0:c00e6c923941 | 28 | / data transfer. This reduces memory consumption 512 bytes each file object. */ |
NirT | 0:c00e6c923941 | 29 | |
NirT | 0:c00e6c923941 | 30 | |
NirT | 0:c00e6c923941 | 31 | #define _FS_READONLY 0 /* 0:Read/Write or 1:Read only */ |
NirT | 0:c00e6c923941 | 32 | /* Setting _FS_READONLY to 1 defines read only configuration. This removes |
NirT | 0:c00e6c923941 | 33 | / writing functions, f_write, f_sync, f_unlink, f_mkdir, f_chmod, f_rename, |
NirT | 0:c00e6c923941 | 34 | / f_truncate and useless f_getfree. */ |
NirT | 0:c00e6c923941 | 35 | |
NirT | 0:c00e6c923941 | 36 | |
NirT | 0:c00e6c923941 | 37 | #define _FS_MINIMIZE 0 /* 0 to 3 */ |
NirT | 0:c00e6c923941 | 38 | /* The _FS_MINIMIZE option defines minimization level to remove some functions. |
NirT | 0:c00e6c923941 | 39 | / |
NirT | 0:c00e6c923941 | 40 | / 0: Full function. |
NirT | 0:c00e6c923941 | 41 | / 1: f_stat, f_getfree, f_unlink, f_mkdir, f_chmod, f_truncate, f_utime |
NirT | 0:c00e6c923941 | 42 | / and f_rename are removed. |
NirT | 0:c00e6c923941 | 43 | / 2: f_opendir and f_readdir are removed in addition to 1. |
NirT | 0:c00e6c923941 | 44 | / 3: f_lseek is removed in addition to 2. */ |
NirT | 0:c00e6c923941 | 45 | |
NirT | 0:c00e6c923941 | 46 | |
NirT | 0:c00e6c923941 | 47 | #define _USE_STRFUNC 2 /* 0:Disable or 1-2:Enable */ |
NirT | 0:c00e6c923941 | 48 | /* To enable string functions, set _USE_STRFUNC to 1 or 2. */ |
NirT | 0:c00e6c923941 | 49 | |
NirT | 0:c00e6c923941 | 50 | |
NirT | 0:c00e6c923941 | 51 | #define _USE_FIND 0 |
NirT | 0:c00e6c923941 | 52 | /* This option switches filtered directory read feature and related functions, |
NirT | 0:c00e6c923941 | 53 | / f_findfirst() and f_findnext(). (0:Disable or 1:Enable) */ |
NirT | 0:c00e6c923941 | 54 | |
NirT | 0:c00e6c923941 | 55 | |
NirT | 0:c00e6c923941 | 56 | #define _USE_MKFS 1 /* 0:Disable or 1:Enable */ |
NirT | 0:c00e6c923941 | 57 | /* To enable f_mkfs function, set _USE_MKFS to 1 and set _FS_READONLY to 0 */ |
NirT | 0:c00e6c923941 | 58 | |
NirT | 0:c00e6c923941 | 59 | |
NirT | 0:c00e6c923941 | 60 | #define _USE_FASTSEEK 1 /* 0:Disable or 1:Enable */ |
NirT | 0:c00e6c923941 | 61 | /* To enable fast seek feature, set _USE_FASTSEEK to 1. */ |
NirT | 0:c00e6c923941 | 62 | |
NirT | 0:c00e6c923941 | 63 | |
NirT | 0:c00e6c923941 | 64 | #define _USE_LABEL 0 /* 0:Disable or 1:Enable */ |
NirT | 0:c00e6c923941 | 65 | /* To enable volume label functions, set _USE_LAVEL to 1 */ |
NirT | 0:c00e6c923941 | 66 | |
NirT | 0:c00e6c923941 | 67 | |
NirT | 0:c00e6c923941 | 68 | #define _USE_FORWARD 0 /* 0:Disable or 1:Enable */ |
NirT | 0:c00e6c923941 | 69 | /* To enable f_forward function, set _USE_FORWARD to 1 and set _FS_TINY to 1. */ |
NirT | 0:c00e6c923941 | 70 | |
NirT | 0:c00e6c923941 | 71 | |
NirT | 0:c00e6c923941 | 72 | #define _USE_BUFF_WO_ALIGNMENT 0 |
NirT | 0:c00e6c923941 | 73 | /* This option is available only for usbh diskio interface and allow to disable |
NirT | 0:c00e6c923941 | 74 | / the management of the unaligned buffer. |
NirT | 0:c00e6c923941 | 75 | / When STM32 USB OTG HS or FS IP is used with internal DMA enabled, this define |
NirT | 0:c00e6c923941 | 76 | / must be set to 0 to align data into 32bits through an internal scratch buffer |
NirT | 0:c00e6c923941 | 77 | / before being processed by the DMA . Otherwise (DMA not used), this define must |
NirT | 0:c00e6c923941 | 78 | / be set to 1 to avoid Data alignment and improve the performance. |
NirT | 0:c00e6c923941 | 79 | / Please note that if _USE_BUFF_WO_ALIGNMENT is set to 1 and an unaligned 32bits |
NirT | 0:c00e6c923941 | 80 | / buffer is forwarded to the FatFs Write/Read functions, an error will be returned. |
NirT | 0:c00e6c923941 | 81 | / (0: default value or 1: unaligned buffer return an error). */ |
NirT | 0:c00e6c923941 | 82 | |
NirT | 0:c00e6c923941 | 83 | /*-----------------------------------------------------------------------------/ |
NirT | 0:c00e6c923941 | 84 | / Local and Namespace Configurations |
NirT | 0:c00e6c923941 | 85 | /-----------------------------------------------------------------------------*/ |
NirT | 0:c00e6c923941 | 86 | |
NirT | 0:c00e6c923941 | 87 | #define _CODE_PAGE 1252 |
NirT | 0:c00e6c923941 | 88 | /* The _CODE_PAGE specifies the OEM code page to be used on the target system. |
NirT | 0:c00e6c923941 | 89 | / Incorrect setting of the code page can cause a file open failure. |
NirT | 0:c00e6c923941 | 90 | / |
NirT | 0:c00e6c923941 | 91 | / 932 - Japanese Shift-JIS (DBCS, OEM, Windows) |
NirT | 0:c00e6c923941 | 92 | / 936 - Simplified Chinese GBK (DBCS, OEM, Windows) |
NirT | 0:c00e6c923941 | 93 | / 949 - Korean (DBCS, OEM, Windows) |
NirT | 0:c00e6c923941 | 94 | / 950 - Traditional Chinese Big5 (DBCS, OEM, Windows) |
NirT | 0:c00e6c923941 | 95 | / 1250 - Central Europe (Windows) |
NirT | 0:c00e6c923941 | 96 | / 1251 - Cyrillic (Windows) |
NirT | 0:c00e6c923941 | 97 | / 1252 - Latin 1 (Windows) |
NirT | 0:c00e6c923941 | 98 | / 1253 - Greek (Windows) |
NirT | 0:c00e6c923941 | 99 | / 1254 - Turkish (Windows) |
NirT | 0:c00e6c923941 | 100 | / 1255 - Hebrew (Windows) |
NirT | 0:c00e6c923941 | 101 | / 1256 - Arabic (Windows) |
NirT | 0:c00e6c923941 | 102 | / 1257 - Baltic (Windows) |
NirT | 0:c00e6c923941 | 103 | / 1258 - Vietnam (OEM, Windows) |
NirT | 0:c00e6c923941 | 104 | / 437 - U.S. (OEM) |
NirT | 0:c00e6c923941 | 105 | / 720 - Arabic (OEM) |
NirT | 0:c00e6c923941 | 106 | / 737 - Greek (OEM) |
NirT | 0:c00e6c923941 | 107 | / 775 - Baltic (OEM) |
NirT | 0:c00e6c923941 | 108 | / 850 - Multilingual Latin 1 (OEM) |
NirT | 0:c00e6c923941 | 109 | / 858 - Multilingual Latin 1 + Euro (OEM) |
NirT | 0:c00e6c923941 | 110 | / 852 - Latin 2 (OEM) |
NirT | 0:c00e6c923941 | 111 | / 855 - Cyrillic (OEM) |
NirT | 0:c00e6c923941 | 112 | / 866 - Russian (OEM) |
NirT | 0:c00e6c923941 | 113 | / 857 - Turkish (OEM) |
NirT | 0:c00e6c923941 | 114 | / 862 - Hebrew (OEM) |
NirT | 0:c00e6c923941 | 115 | / 874 - Thai (OEM, Windows) |
NirT | 0:c00e6c923941 | 116 | / 1 - ASCII only (Valid for non LFN cfg.) |
NirT | 0:c00e6c923941 | 117 | */ |
NirT | 0:c00e6c923941 | 118 | |
NirT | 0:c00e6c923941 | 119 | |
NirT | 0:c00e6c923941 | 120 | #define _USE_LFN 3 /* 0 to 3 */ |
NirT | 0:c00e6c923941 | 121 | #define _MAX_LFN 255 /* Maximum LFN length to handle (12 to 255) */ |
NirT | 0:c00e6c923941 | 122 | /* The _USE_LFN option switches the LFN feature. |
NirT | 0:c00e6c923941 | 123 | / |
NirT | 0:c00e6c923941 | 124 | / 0: Disable LFN feature. _MAX_LFN has no effect. |
NirT | 0:c00e6c923941 | 125 | / 1: Enable LFN with static working buffer on the BSS. Always NOT reentrant. |
NirT | 0:c00e6c923941 | 126 | / 2: Enable LFN with dynamic working buffer on the STACK. |
NirT | 0:c00e6c923941 | 127 | / 3: Enable LFN with dynamic working buffer on the HEAP. |
NirT | 0:c00e6c923941 | 128 | / |
NirT | 0:c00e6c923941 | 129 | / To enable LFN feature, Unicode handling functions ff_convert() and ff_wtoupper() |
NirT | 0:c00e6c923941 | 130 | / function must be added to the project. |
NirT | 0:c00e6c923941 | 131 | / The LFN working buffer occupies (_MAX_LFN + 1) * 2 bytes. When use stack for the |
NirT | 0:c00e6c923941 | 132 | / working buffer, take care on stack overflow. When use heap memory for the working |
NirT | 0:c00e6c923941 | 133 | / buffer, memory management functions, ff_memalloc() and ff_memfree(), must be added |
NirT | 0:c00e6c923941 | 134 | / to the project. */ |
NirT | 0:c00e6c923941 | 135 | |
NirT | 0:c00e6c923941 | 136 | |
NirT | 0:c00e6c923941 | 137 | #define _LFN_UNICODE 0 /* 0:ANSI/OEM or 1:Unicode */ |
NirT | 0:c00e6c923941 | 138 | /* To switch the character encoding on the FatFs API to Unicode, enable LFN feature |
NirT | 0:c00e6c923941 | 139 | / and set _LFN_UNICODE to 1. */ |
NirT | 0:c00e6c923941 | 140 | |
NirT | 0:c00e6c923941 | 141 | |
NirT | 0:c00e6c923941 | 142 | #define _STRF_ENCODE 3 /* 0:ANSI/OEM, 1:UTF-16LE, 2:UTF-16BE, 3:UTF-8 */ |
NirT | 0:c00e6c923941 | 143 | /* When Unicode API is enabled, character encoding on the all FatFs API is switched |
NirT | 0:c00e6c923941 | 144 | / to Unicode. This option selects the character encoding on the file to be read/written |
NirT | 0:c00e6c923941 | 145 | / via string functions, f_gets(), f_putc(), f_puts and f_printf(). |
NirT | 0:c00e6c923941 | 146 | / This option has no effect when _LFN_UNICODE is 0. */ |
NirT | 0:c00e6c923941 | 147 | |
NirT | 0:c00e6c923941 | 148 | |
NirT | 0:c00e6c923941 | 149 | #define _FS_RPATH 0 /* 0 to 2 */ |
NirT | 0:c00e6c923941 | 150 | /* The _FS_RPATH option configures relative path feature. |
NirT | 0:c00e6c923941 | 151 | / |
NirT | 0:c00e6c923941 | 152 | / 0: Disable relative path feature and remove related functions. |
NirT | 0:c00e6c923941 | 153 | / 1: Enable relative path. f_chdrive() and f_chdir() function are available. |
NirT | 0:c00e6c923941 | 154 | / 2: f_getcwd() function is available in addition to 1. |
NirT | 0:c00e6c923941 | 155 | / |
NirT | 0:c00e6c923941 | 156 | / Note that output of the f_readdir() fnction is affected by this option. */ |
NirT | 0:c00e6c923941 | 157 | |
NirT | 0:c00e6c923941 | 158 | |
NirT | 0:c00e6c923941 | 159 | /*---------------------------------------------------------------------------/ |
NirT | 0:c00e6c923941 | 160 | / Drive/Volume Configurations |
NirT | 0:c00e6c923941 | 161 | /----------------------------------------------------------------------------*/ |
NirT | 0:c00e6c923941 | 162 | |
NirT | 0:c00e6c923941 | 163 | #define _VOLUMES 2 |
NirT | 0:c00e6c923941 | 164 | /* Number of volumes (logical drives) to be used. */ |
NirT | 0:c00e6c923941 | 165 | |
NirT | 0:c00e6c923941 | 166 | |
NirT | 0:c00e6c923941 | 167 | #define _MULTI_PARTITION 0 /* 0:Single partition, 1:Enable multiple partition */ |
NirT | 0:c00e6c923941 | 168 | /* When set to 0, each volume is bound to the same physical drive number and |
NirT | 0:c00e6c923941 | 169 | / it can mount only first primaly partition. When it is set to 1, each volume |
NirT | 0:c00e6c923941 | 170 | / is tied to the partitions listed in VolToPart[]. */ |
NirT | 0:c00e6c923941 | 171 | |
NirT | 0:c00e6c923941 | 172 | |
NirT | 0:c00e6c923941 | 173 | #define _MIN_SS 512 |
NirT | 0:c00e6c923941 | 174 | #define _MAX_SS 512 |
NirT | 0:c00e6c923941 | 175 | /* These options configure the range of sector size to be supported. (512, 1024, 2048 or |
NirT | 0:c00e6c923941 | 176 | / 4096) Always set both 512 for most systems, all memory card and harddisk. But a larger |
NirT | 0:c00e6c923941 | 177 | / value may be required for on-board flash memory and some type of optical media. |
NirT | 0:c00e6c923941 | 178 | / When _MAX_SS is larger than _MIN_SS, FatFs is configured to variable sector size and |
NirT | 0:c00e6c923941 | 179 | / GET_SECTOR_SIZE command must be implemented to the disk_ioctl() function. */ |
NirT | 0:c00e6c923941 | 180 | |
NirT | 0:c00e6c923941 | 181 | |
NirT | 0:c00e6c923941 | 182 | #define _USE_TRIM 0 |
NirT | 0:c00e6c923941 | 183 | /* This option switches ATA-TRIM feature. (0:Disable or 1:Enable) |
NirT | 0:c00e6c923941 | 184 | / To enable Trim feature, also CTRL_TRIM command should be implemented to the |
NirT | 0:c00e6c923941 | 185 | / disk_ioctl() function. */ |
NirT | 0:c00e6c923941 | 186 | |
NirT | 0:c00e6c923941 | 187 | |
NirT | 0:c00e6c923941 | 188 | #define _FS_NOFSINFO 1 /* 0 or 1 */ |
NirT | 0:c00e6c923941 | 189 | /* If you need to know the correct free space on the FAT32 volume, set this |
NirT | 0:c00e6c923941 | 190 | / option to 1 and f_getfree() function at first time after volume mount will |
NirT | 0:c00e6c923941 | 191 | / force a full FAT scan. |
NirT | 0:c00e6c923941 | 192 | / |
NirT | 0:c00e6c923941 | 193 | / 0: Load all informations in the FSINFO if available. |
NirT | 0:c00e6c923941 | 194 | / 1: Do not trust free cluster count in the FSINFO. |
NirT | 0:c00e6c923941 | 195 | */ |
NirT | 0:c00e6c923941 | 196 | |
NirT | 0:c00e6c923941 | 197 | |
NirT | 0:c00e6c923941 | 198 | /*---------------------------------------------------------------------------/ |
NirT | 0:c00e6c923941 | 199 | / System Configurations |
NirT | 0:c00e6c923941 | 200 | /----------------------------------------------------------------------------*/ |
NirT | 0:c00e6c923941 | 201 | |
NirT | 0:c00e6c923941 | 202 | #define _FS_NORTC 0 |
NirT | 0:c00e6c923941 | 203 | #define _NORTC_MON 2 |
NirT | 0:c00e6c923941 | 204 | #define _NORTC_MDAY 1 |
NirT | 0:c00e6c923941 | 205 | #define _NORTC_YEAR 2015 |
NirT | 0:c00e6c923941 | 206 | /* The _FS_NORTC option switches timestamp feature. If the system does not have |
NirT | 0:c00e6c923941 | 207 | / an RTC function or valid timestamp is not needed, set _FS_NORTC to 1 to disable |
NirT | 0:c00e6c923941 | 208 | / the timestamp feature. All objects modified by FatFs will have a fixed timestamp |
NirT | 0:c00e6c923941 | 209 | / defined by _NORTC_MON, _NORTC_MDAY and _NORTC_YEAR. |
NirT | 0:c00e6c923941 | 210 | / When timestamp feature is enabled (_FS_NORTC == 0), get_fattime() function need |
NirT | 0:c00e6c923941 | 211 | / to be added to the project to read current time form RTC. _NORTC_MON, |
NirT | 0:c00e6c923941 | 212 | / _NORTC_MDAY and _NORTC_YEAR have no effect. |
NirT | 0:c00e6c923941 | 213 | / These options have no effect at read-only configuration (_FS_READONLY == 1). */ |
NirT | 0:c00e6c923941 | 214 | |
NirT | 0:c00e6c923941 | 215 | #define _WORD_ACCESS 0 /* 0 or 1 */ |
NirT | 0:c00e6c923941 | 216 | /* The _WORD_ACCESS option is an only platform dependent option. It defines |
NirT | 0:c00e6c923941 | 217 | / which access method is used to the word data on the FAT volume. |
NirT | 0:c00e6c923941 | 218 | / |
NirT | 0:c00e6c923941 | 219 | / 0: Byte-by-byte access. Always compatible with all platforms. |
NirT | 0:c00e6c923941 | 220 | / 1: Word access. Do not choose this unless under both the following conditions. |
NirT | 0:c00e6c923941 | 221 | / |
NirT | 0:c00e6c923941 | 222 | / * Byte order on the memory is little-endian. |
NirT | 0:c00e6c923941 | 223 | / * Address miss-aligned word access is always allowed for all instructions. |
NirT | 0:c00e6c923941 | 224 | / |
NirT | 0:c00e6c923941 | 225 | / If it is the case, _WORD_ACCESS can also be set to 1 to improve performance |
NirT | 0:c00e6c923941 | 226 | / and reduce code size. |
NirT | 0:c00e6c923941 | 227 | */ |
NirT | 0:c00e6c923941 | 228 | |
NirT | 0:c00e6c923941 | 229 | |
NirT | 0:c00e6c923941 | 230 | /* A header file that defines sync object types on the O/S, such as |
NirT | 0:c00e6c923941 | 231 | / windows.h, ucos_ii.h and semphr.h, must be included prior to ff.h. */ |
NirT | 0:c00e6c923941 | 232 | |
NirT | 0:c00e6c923941 | 233 | #define _FS_REENTRANT 1 /* 0:Disable or 1:Enable */ |
NirT | 0:c00e6c923941 | 234 | #define _FS_TIMEOUT 1000 /* Timeout period in unit of time ticks */ |
NirT | 0:c00e6c923941 | 235 | #define _SYNC_t osSemaphoreId /* O/S dependent type of sync object. e.g. HANDLE, OS_EVENT*, ID and etc.. */ |
NirT | 0:c00e6c923941 | 236 | |
NirT | 0:c00e6c923941 | 237 | /* The _FS_REENTRANT option switches the re-entrancy (thread safe) of the FatFs module. |
NirT | 0:c00e6c923941 | 238 | / |
NirT | 0:c00e6c923941 | 239 | / 0: Disable re-entrancy. _SYNC_t and _FS_TIMEOUT have no effect. |
NirT | 0:c00e6c923941 | 240 | / 1: Enable re-entrancy. Also user provided synchronization handlers, |
NirT | 0:c00e6c923941 | 241 | / ff_req_grant(), ff_rel_grant(), ff_del_syncobj() and ff_cre_syncobj() |
NirT | 0:c00e6c923941 | 242 | / function must be added to the project. */ |
NirT | 0:c00e6c923941 | 243 | |
NirT | 0:c00e6c923941 | 244 | |
NirT | 0:c00e6c923941 | 245 | #define _FS_LOCK 10 /* 0:Disable or >=1:Enable */ |
NirT | 0:c00e6c923941 | 246 | /* To enable file lock control feature, set _FS_LOCK to 1 or greater. |
NirT | 0:c00e6c923941 | 247 | The value defines how many files can be opened simultaneously. */ |
NirT | 0:c00e6c923941 | 248 | |
NirT | 0:c00e6c923941 | 249 | |
NirT | 0:c00e6c923941 | 250 | #endif /* _FFCONFIG */ |
NirT | 0:c00e6c923941 | 251 |