1 /* Exported types ------------------------------------------------------------*/ 2 /* Exported constants --------------------------------------------------------*/ 3 /* Uncomment the line below to expanse the "assert_param" macro in the 4 Standard Peripheral Library drivers code */ 5 /* #define USE_FULL_ASSERT 1 */ 6 7 /* Exported macro ------------------------------------------------------------*/ 8 #ifdef USE_FULL_ASSERT 9 10 /** 11 * @brief The assert_param macro is used for function\'s parameters check. 12 * @param expr: If expr is false, it calls assert_failed function which reports 13 * the name of the source file and the source line number of the call 14 * that failed. If expr is true, it returns no value. 15 * @retval None 16 */ 17 #define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__)) 18 /* Exported functions ------------------------------------------------------- */ 19 void assert_failed(uint8_t* file, uint32_t line); 20 #else 21 #define assert_param(expr) ((void)0) 22 #endif /* USE_FULL_ASSERT */