Mercurial > public > ostc4
comparison Small_CPU/Inc/stm32f4xx_hal_conf.h @ 131:f35e53ef04e0 FlipDisplay
Update of configuration and projectfiles to support new library folder structure
author | Ideenmodellierer |
---|---|
date | Sun, 17 Feb 2019 21:29:38 +0100 |
parents | 5f11787b4f42 |
children |
comparison
equal
deleted
inserted
replaced
130:b7689d9e888a | 131:f35e53ef04e0 |
---|---|
45 | 45 |
46 /* Exported types ------------------------------------------------------------*/ | 46 /* Exported types ------------------------------------------------------------*/ |
47 /* Exported constants --------------------------------------------------------*/ | 47 /* Exported constants --------------------------------------------------------*/ |
48 | 48 |
49 /* ######################### Hardware Selection ############################## */ | 49 /* ######################### Hardware Selection ############################## */ |
50 #define STM32F411xE | 50 /* #define STM32F411xE now defined in preprocessor */ |
51 | 51 |
52 /* ########################## Module Selection ############################## */ | 52 /* ########################## Module Selection ############################## */ |
53 /** | 53 /** |
54 * @brief This is the list of modules to be used in the HAL driver | 54 * @brief This is the list of modules to be used in the HAL driver |
55 */ | 55 */ |
98 * @brief Adjust the value of External High Speed oscillator (HSE) used in your application. | 98 * @brief Adjust the value of External High Speed oscillator (HSE) used in your application. |
99 * This value is used by the RCC HAL module to compute the system frequency | 99 * This value is used by the RCC HAL module to compute the system frequency |
100 * (when HSE is used as system clock source, directly or through the PLL). | 100 * (when HSE is used as system clock source, directly or through the PLL). |
101 */ | 101 */ |
102 #if !defined (HSE_VALUE) | 102 #if !defined (HSE_VALUE) |
103 #define HSE_VALUE ((uint32_t)8000000) /*!< Value of the External oscillator in Hz */ | 103 #define HSE_VALUE ((uint32_t)8000000U) /*!< Value of the External oscillator in Hz */ |
104 #endif /* HSE_VALUE */ | 104 #endif /* HSE_VALUE */ |
105 | 105 |
106 #if !defined (HSE_STARTUP_TIMEOUT) | 106 #if !defined (HSE_STARTUP_TIMEOUT) |
107 #define HSE_STARTUP_TIMEOUT ((uint32_t)5000) /*!< Time out for HSE start up, in ms */ | 107 #define HSE_STARTUP_TIMEOUT ((uint32_t)5000U) /*!< Time out for HSE start up, in ms */ |
108 #endif /* HSE_STARTUP_TIMEOUT */ | 108 #endif /* HSE_STARTUP_TIMEOUT */ |
109 | 109 |
110 /** | 110 /** |
111 * @brief Internal High Speed oscillator (HSI) value. | 111 * @brief Internal High Speed oscillator (HSI) value. |
112 * This value is used by the RCC HAL module to compute the system frequency | 112 * This value is used by the RCC HAL module to compute the system frequency |
113 * (when HSI is used as system clock source, directly or through the PLL). | 113 * (when HSI is used as system clock source, directly or through the PLL). |
114 */ | 114 */ |
115 #if !defined (HSI_VALUE) | 115 #if !defined (HSI_VALUE) |
116 #define HSI_VALUE ((uint32_t)16000000) /*!< Value of the Internal oscillator in Hz*/ | 116 #define HSI_VALUE ((uint32_t)16000000U) /*!< Value of the Internal oscillator in Hz*/ |
117 #endif /* HSI_VALUE */ | 117 #endif /* HSI_VALUE */ |
118 | 118 |
119 /** | 119 /** |
120 * @brief Internal Low Speed oscillator (LSI) value. | 120 * @brief Internal Low Speed oscillator (LSI) value. |
121 */ | 121 */ |
122 #if !defined (LSI_VALUE) | 122 #if !defined (LSI_VALUE) |
123 #define LSI_VALUE ((uint32_t)40000) | 123 #define LSI_VALUE ((uint32_t)40000U) |
124 #endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz | 124 #endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz |
125 The real value may vary depending on the variations | 125 The real value may vary depending on the variations |
126 in voltage and temperature. */ | 126 in voltage and temperature. */ |
127 /** | 127 /** |
128 * @brief External Low Speed oscillator (LSE) value. | 128 * @brief External Low Speed oscillator (LSE) value. |
129 */ | 129 */ |
130 #if !defined (LSE_VALUE) | 130 #if !defined (LSE_VALUE) |
131 #define LSE_VALUE ((uint32_t)32768) /*!< Value of the External Low Speed oscillator in Hz */ | 131 #define LSE_VALUE ((uint32_t)32768U) /*!< Value of the External Low Speed oscillator in Hz */ |
132 #endif /* LSE_VALUE */ | 132 #endif /* LSE_VALUE */ |
133 | 133 |
134 #if !defined (LSE_STARTUP_TIMEOUT) | |
135 #define LSE_STARTUP_TIMEOUT 5000U /*!< Time out for LSE start up, in ms */ | |
136 #endif /* LSE_STARTUP_TIMEOUT */ | |
134 /** | 137 /** |
135 * @brief External clock source for I2S peripheral | 138 * @brief External clock source for I2S peripheral |
136 * This value is used by the I2S HAL module to compute the I2S clock source | 139 * This value is used by the I2S HAL module to compute the I2S clock source |
137 * frequency, this source is inserted directly through I2S_CKIN pad. | 140 * frequency, this source is inserted directly through I2S_CKIN pad. |
138 */ | 141 */ |
139 #if !defined (EXTERNAL_CLOCK_VALUE) | 142 #if !defined (EXTERNAL_CLOCK_VALUE) |
140 #define EXTERNAL_CLOCK_VALUE ((uint32_t)12288000) /*!< Value of the Internal oscillator in Hz*/ | 143 #define EXTERNAL_CLOCK_VALUE ((uint32_t)12288000U) /*!< Value of the Internal oscillator in Hz*/ |
141 #endif /* EXTERNAL_CLOCK_VALUE */ | 144 #endif /* EXTERNAL_CLOCK_VALUE */ |
142 | 145 |
143 /* Tip: To avoid modifying this file each time you need to use different HSE, | 146 /* Tip: To avoid modifying this file each time you need to use different HSE, |
144 === you can define the HSE value in your toolchain compiler preprocessor. */ | 147 === you can define the HSE value in your toolchain compiler preprocessor. */ |
145 | 148 |
146 /* ########################### System Configuration ######################### */ | 149 /* ########################### System Configuration ######################### */ |
147 /** | 150 /** |
148 * @brief This is the HAL system configuration section | 151 * @brief This is the HAL system configuration section |
149 */ | 152 */ |
150 #define VDD_VALUE ((uint32_t)3300) /*!< Value of VDD in mv */ | 153 #define VDD_VALUE ((uint32_t)3300U) /*!< Value of VDD in mv */ |
151 #define TICK_INT_PRIORITY ((uint32_t)0) /*!< tick interrupt priority */ | 154 #define TICK_INT_PRIORITY ((uint32_t)0) /*!< tick interrupt priority */ |
152 #define USE_RTOS 0 | 155 #define USE_RTOS 0U |
153 #define PREFETCH_ENABLE 1 | 156 #define PREFETCH_ENABLE 1U |
154 #define INSTRUCTION_CACHE_ENABLE 1 | 157 #define INSTRUCTION_CACHE_ENABLE 1U |
155 #define DATA_CACHE_ENABLE 1 | 158 #define DATA_CACHE_ENABLE 1U |
156 | 159 |
157 /* ########################## Assert Selection ############################## */ | 160 /* ########################## Assert Selection ############################## */ |
158 /** | 161 /** |
159 * @brief Uncomment the line below to expanse the "assert_param" macro in the | 162 * @brief Uncomment the line below to expanse the "assert_param" macro in the |
160 * HAL drivers code | 163 * HAL drivers code |
164 /* ################## Ethernet peripheral configuration ##################### */ | 167 /* ################## Ethernet peripheral configuration ##################### */ |
165 | 168 |
166 /* Section 1 : Ethernet peripheral configuration */ | 169 /* Section 1 : Ethernet peripheral configuration */ |
167 | 170 |
168 /* MAC ADDRESS: MAC_ADDR0:MAC_ADDR1:MAC_ADDR2:MAC_ADDR3:MAC_ADDR4:MAC_ADDR5 */ | 171 /* MAC ADDRESS: MAC_ADDR0:MAC_ADDR1:MAC_ADDR2:MAC_ADDR3:MAC_ADDR4:MAC_ADDR5 */ |
169 #define MAC_ADDR0 2 | 172 #define MAC_ADDR0 2U |
170 #define MAC_ADDR1 0 | 173 #define MAC_ADDR1 0U |
171 #define MAC_ADDR2 0 | 174 #define MAC_ADDR2 0U |
172 #define MAC_ADDR3 0 | 175 #define MAC_ADDR3 0U |
173 #define MAC_ADDR4 0 | 176 #define MAC_ADDR4 0U |
174 #define MAC_ADDR5 0 | 177 #define MAC_ADDR5 0U |
175 | 178 |
176 /* Definition of the Ethernet driver buffers size and count */ | 179 /* Definition of the Ethernet driver buffers size and count */ |
177 #define ETH_RX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for receive */ | 180 #define ETH_RX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for receive */ |
178 #define ETH_TX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for transmit */ | 181 #define ETH_TX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for transmit */ |
179 #define ETH_RXBUFNB ((uint32_t)4) /* 4 Rx buffers of size ETH_RX_BUF_SIZE */ | 182 #define ETH_RXBUFNB ((uint32_t)4U) /* 4 Rx buffers of size ETH_RX_BUF_SIZE */ |
180 #define ETH_TXBUFNB ((uint32_t)4) /* 4 Tx buffers of size ETH_TX_BUF_SIZE */ | 183 #define ETH_TXBUFNB ((uint32_t)4U) /* 4 Tx buffers of size ETH_TX_BUF_SIZE */ |
181 | 184 |
182 /* Section 2: PHY configuration section */ | 185 /* Section 2: PHY configuration section */ |
183 | 186 |
184 /* DP83848 PHY Address*/ | 187 /* DP83848 PHY Address*/ |
185 #define DP83848_PHY_ADDRESS 0x01 | 188 #define DP83848_PHY_ADDRESS 0x01U |
186 /* PHY Reset delay these values are based on a 1 ms Systick interrupt*/ | 189 /* PHY Reset delay these values are based on a 1 ms Systick interrupt*/ |
187 #define PHY_RESET_DELAY ((uint32_t)0x000000FF) | 190 #define PHY_RESET_DELAY ((uint32_t)0x000000FFU) |
188 /* PHY Configuration delay */ | 191 /* PHY Configuration delay */ |
189 #define PHY_CONFIG_DELAY ((uint32_t)0x00000FFF) | 192 #define PHY_CONFIG_DELAY ((uint32_t)0x00000FFFU) |
190 | 193 |
191 #define PHY_READ_TO ((uint32_t)0x0000FFFF) | 194 #define PHY_READ_TO ((uint32_t)0x0000FFFFU) |
192 #define PHY_WRITE_TO ((uint32_t)0x0000FFFF) | 195 #define PHY_WRITE_TO ((uint32_t)0x0000FFFFU) |
193 | 196 |
194 /* Section 3: Common PHY Registers */ | 197 /* Section 3: Common PHY Registers */ |
195 | 198 |
196 #define PHY_BCR ((uint16_t)0x00) /*!< Transceiver Basic Control Register */ | 199 #define PHY_BCR ((uint16_t)0x0000) /*!< Transceiver Basic Control Register */ |
197 #define PHY_BSR ((uint16_t)0x01) /*!< Transceiver Basic Status Register */ | 200 #define PHY_BSR ((uint16_t)0x0001) /*!< Transceiver Basic Status Register */ |
198 | 201 |
199 #define PHY_RESET ((uint16_t)0x8000) /*!< PHY Reset */ | 202 #define PHY_RESET ((uint16_t)0x8000) /*!< PHY Reset */ |
200 #define PHY_LOOPBACK ((uint16_t)0x4000) /*!< Select loop-back mode */ | 203 #define PHY_LOOPBACK ((uint16_t)0x4000) /*!< Select loop-back mode */ |
201 #define PHY_FULLDUPLEX_100M ((uint16_t)0x2100) /*!< Set the full-duplex mode at 100 Mb/s */ | 204 #define PHY_FULLDUPLEX_100M ((uint16_t)0x2100) /*!< Set the full-duplex mode at 100 Mb/s */ |
202 #define PHY_HALFDUPLEX_100M ((uint16_t)0x2000) /*!< Set the half-duplex mode at 100 Mb/s */ | 205 #define PHY_HALFDUPLEX_100M ((uint16_t)0x2000) /*!< Set the half-duplex mode at 100 Mb/s */ |
211 #define PHY_LINKED_STATUS ((uint16_t)0x0004) /*!< Valid link established */ | 214 #define PHY_LINKED_STATUS ((uint16_t)0x0004) /*!< Valid link established */ |
212 #define PHY_JABBER_DETECTION ((uint16_t)0x0002) /*!< Jabber condition detected */ | 215 #define PHY_JABBER_DETECTION ((uint16_t)0x0002) /*!< Jabber condition detected */ |
213 | 216 |
214 /* Section 4: Extended PHY Registers */ | 217 /* Section 4: Extended PHY Registers */ |
215 | 218 |
216 #define PHY_SR ((uint16_t)0x10) /*!< PHY status register Offset */ | 219 #define PHY_SR ((uint16_t)0x0010) /*!< PHY status register Offset */ |
217 #define PHY_MICR ((uint16_t)0x11) /*!< MII Interrupt Control Register */ | 220 #define PHY_MICR ((uint16_t)0x0011) /*!< MII Interrupt Control Register */ |
218 #define PHY_MISR ((uint16_t)0x12) /*!< MII Interrupt Status and Misc. Control Register */ | 221 #define PHY_MISR ((uint16_t)0x0012) /*!< MII Interrupt Status and Misc. Control Register */ |
219 | 222 |
220 #define PHY_LINK_STATUS ((uint16_t)0x0001) /*!< PHY Link mask */ | 223 #define PHY_LINK_STATUS ((uint16_t)0x0001) /*!< PHY Link mask */ |
221 #define PHY_SPEED_STATUS ((uint16_t)0x0002) /*!< PHY Speed mask */ | 224 #define PHY_SPEED_STATUS ((uint16_t)0x0002) /*!< PHY Speed mask */ |
222 #define PHY_DUPLEX_STATUS ((uint16_t)0x0004) /*!< PHY Duplex mask */ | 225 #define PHY_DUPLEX_STATUS ((uint16_t)0x0004) /*!< PHY Duplex mask */ |
223 | 226 |
225 #define PHY_MICR_INT_OE ((uint16_t)0x0001) /*!< PHY Enable output interrupt events */ | 228 #define PHY_MICR_INT_OE ((uint16_t)0x0001) /*!< PHY Enable output interrupt events */ |
226 | 229 |
227 #define PHY_MISR_LINK_INT_EN ((uint16_t)0x0020) /*!< Enable Interrupt on change of link status */ | 230 #define PHY_MISR_LINK_INT_EN ((uint16_t)0x0020) /*!< Enable Interrupt on change of link status */ |
228 #define PHY_LINK_INTERRUPT ((uint16_t)0x2000) /*!< PHY link status interrupt mask */ | 231 #define PHY_LINK_INTERRUPT ((uint16_t)0x2000) /*!< PHY link status interrupt mask */ |
229 | 232 |
233 /* ################## SPI peripheral configuration ########################## */ | |
234 | |
235 /* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver | |
236 * Activated: CRC code is present inside driver | |
237 * Deactivated: CRC code cleaned from driver | |
238 */ | |
239 | |
240 /*#define USE_SPI_CRC 1U*/ | |
230 /* Includes ------------------------------------------------------------------*/ | 241 /* Includes ------------------------------------------------------------------*/ |
231 /** | 242 /** |
232 * @brief Include module's header file | 243 * @brief Include module's header file |
233 */ | 244 */ |
234 | 245 |
254 | 265 |
255 #ifdef HAL_CAN_MODULE_ENABLED | 266 #ifdef HAL_CAN_MODULE_ENABLED |
256 #include "stm32f4xx_hal_can.h" | 267 #include "stm32f4xx_hal_can.h" |
257 #endif /* HAL_CAN_MODULE_ENABLED */ | 268 #endif /* HAL_CAN_MODULE_ENABLED */ |
258 | 269 |
270 #ifdef HAL_CAN_LEGACY_MODULE_ENABLED | |
271 #include "stm32f4xx_hal_can_legacy.h" | |
272 #endif /* HAL_CAN_LEGACY_MODULE_ENABLED */ | |
273 | |
259 #ifdef HAL_CRC_MODULE_ENABLED | 274 #ifdef HAL_CRC_MODULE_ENABLED |
260 #include "stm32f4xx_hal_crc.h" | 275 #include "stm32f4xx_hal_crc.h" |
261 #endif /* HAL_CRC_MODULE_ENABLED */ | 276 #endif /* HAL_CRC_MODULE_ENABLED */ |
262 | 277 |
263 #ifdef HAL_CRYP_MODULE_ENABLED | 278 #ifdef HAL_CRYP_MODULE_ENABLED |
378 | 393 |
379 #ifdef HAL_HCD_MODULE_ENABLED | 394 #ifdef HAL_HCD_MODULE_ENABLED |
380 #include "stm32f4xx_hal_hcd.h" | 395 #include "stm32f4xx_hal_hcd.h" |
381 #endif /* HAL_HCD_MODULE_ENABLED */ | 396 #endif /* HAL_HCD_MODULE_ENABLED */ |
382 | 397 |
398 #ifdef HAL_DSI_MODULE_ENABLED | |
399 #include "stm32f4xx_hal_dsi.h" | |
400 #endif /* HAL_DSI_MODULE_ENABLED */ | |
401 | |
402 #ifdef HAL_QSPI_MODULE_ENABLED | |
403 #include "stm32f4xx_hal_qspi.h" | |
404 #endif /* HAL_QSPI_MODULE_ENABLED */ | |
405 | |
406 #ifdef HAL_CEC_MODULE_ENABLED | |
407 #include "stm32f4xx_hal_cec.h" | |
408 #endif /* HAL_CEC_MODULE_ENABLED */ | |
409 | |
410 #ifdef HAL_FMPI2C_MODULE_ENABLED | |
411 #include "stm32f4xx_hal_fmpi2c.h" | |
412 #endif /* HAL_FMPI2C_MODULE_ENABLED */ | |
413 | |
414 #ifdef HAL_SPDIFRX_MODULE_ENABLED | |
415 #include "stm32f4xx_hal_spdifrx.h" | |
416 #endif /* HAL_SPDIFRX_MODULE_ENABLED */ | |
417 | |
418 #ifdef HAL_DFSDM_MODULE_ENABLED | |
419 #include "stm32f4xx_hal_dfsdm.h" | |
420 #endif /* HAL_DFSDM_MODULE_ENABLED */ | |
421 | |
422 #ifdef HAL_LPTIM_MODULE_ENABLED | |
423 #include "stm32f4xx_hal_lptim.h" | |
424 #endif /* HAL_LPTIM_MODULE_ENABLED */ | |
425 | |
426 #ifdef HAL_MMC_MODULE_ENABLED | |
427 #include "stm32f4xx_hal_mmc.h" | |
428 #endif /* HAL_MMC_MODULE_ENABLED */ | |
383 /* Exported macro ------------------------------------------------------------*/ | 429 /* Exported macro ------------------------------------------------------------*/ |
384 #ifdef USE_FULL_ASSERT | 430 #ifdef USE_FULL_ASSERT |
385 /** | 431 /** |
386 * @brief The assert_param macro is used for function's parameters check. | 432 * @brief The assert_param macro is used for function's parameters check. |
387 * @param expr: If expr is false, it calls assert_failed function | 433 * @param expr: If expr is false, it calls assert_failed function |
388 * which reports the name of the source file and the source | 434 * which reports the name of the source file and the source |
389 * line number of the call that failed. | 435 * line number of the call that failed. |
390 * If expr is true, it returns no value. | 436 * If expr is true, it returns no value. |
391 * @retval None | 437 * @retval None |
392 */ | 438 */ |
393 #define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__)) | 439 #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) |
394 /* Exported functions ------------------------------------------------------- */ | 440 /* Exported functions ------------------------------------------------------- */ |
395 void assert_failed(uint8_t* file, uint32_t line); | 441 void assert_failed(uint8_t* file, uint32_t line); |
396 #else | 442 #else |
397 #define assert_param(expr) ((void)0) | 443 #define assert_param(expr) ((void)0U) |
398 #endif /* USE_FULL_ASSERT */ | 444 #endif /* USE_FULL_ASSERT */ |
399 | 445 |
400 | 446 |
401 #ifdef __cplusplus | 447 #ifdef __cplusplus |
402 } | 448 } |