|
59 | 59 | #ifdef __cplusplus
|
60 | 60 | extern "C" {
|
61 | 61 | #endif /* __cplusplus */
|
62 |
| - |
| 62 | + |
63 | 63 | /** @addtogroup Library_configuration_section
|
64 | 64 | * @{
|
65 | 65 | */
|
|
125 | 125 | #define STM32F407xx
|
126 | 126 | #endif
|
127 | 127 |
|
| 128 | +#if defined(STM32F439xx) || defined(STM32F429xx) |
| 129 | +#define STM32F429_439xx |
| 130 | + |
| 131 | +#elif defined(STM32F437xx) || defined(STM32F427xx) |
| 132 | +#define STM32F427_437xx |
| 133 | + |
| 134 | +#elif defined(STM32F405xx) || defined(STM32F415xx) || \ |
| 135 | + defined(STM32F407xx) || defined(STM32F417xx) |
| 136 | +#define STM32F40_41xxx |
| 137 | + |
| 138 | +#elif defined(STM32F401xC) || defined(STM32F401xE) |
| 139 | +#define STM32F401xx |
| 140 | + |
| 141 | +#elif defined(STM32F411xE) |
| 142 | +#define STM32F411xx |
| 143 | + |
| 144 | +#elif defined(STM32F2XX) |
| 145 | + |
| 146 | +#else |
| 147 | +#error "STM32F2xx/F4xx device not specified" |
| 148 | +#endif |
| 149 | + |
| 150 | + |
128 | 151 | #if defined(STM32F405xx)
|
129 | 152 | #include "stm32f405xx.h"
|
130 | 153 | #elif defined(STM32F415xx)
|
@@ -210,6 +233,32 @@ typedef enum
|
210 | 233 | #include "stm32f4xx_hal.h"
|
211 | 234 | #endif /* USE_HAL_DRIVER */
|
212 | 235 |
|
| 236 | + |
| 237 | +/* Uncomment the line below to expanse the "assert_param" macro in the |
| 238 | + Standard Peripheral Library drivers code */ |
| 239 | +//#define USE_FULL_ASSERT 1 |
| 240 | + |
| 241 | +/* Exported macro ------------------------------------------------------------*/ |
| 242 | +#ifdef USE_FULL_ASSERT |
| 243 | + |
| 244 | +/** |
| 245 | + * @brief The assert_param macro is used for function's parameters check. |
| 246 | + * @param expr: If expr is false, it calls assert_failed function |
| 247 | + * which reports the name of the source file and the source |
| 248 | + * line number of the call that failed. |
| 249 | + * If expr is true, it returns no value. |
| 250 | + * @retval None |
| 251 | + */ |
| 252 | + #define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__)) |
| 253 | +/* Exported functions ------------------------------------------------------- */ |
| 254 | + void assert_failed(uint8_t* file, uint32_t line); |
| 255 | +#else |
| 256 | + #ifndef assert_param |
| 257 | + #define assert_param(expr) ((void)0) |
| 258 | + #endif |
| 259 | +#endif /* USE_FULL_ASSERT */ |
| 260 | + |
| 261 | + |
213 | 262 | #ifdef __cplusplus
|
214 | 263 | }
|
215 | 264 | #endif /* __cplusplus */
|
|
0 commit comments