/* Set the PRIGROUP[10:8] bits according to the PriorityGroup parameter value */
NVIC_SetPriorityGrouping(PriorityGroup);
}
复制代码
这里第一条语句assert_param就是断言函数,它用来判断函数参数PriorityGroup是否合法,断言函数assert_param使用一个宏来实现的,通过MDK的“Go To Definition of ‘assert_param’”可以在stm32f4xx_hal_conf.h中找到其定义如下:
#ifdef USE_FULL_ASSERT
/**
* @brief The assert_param macro is used for function's parameters check.
* @param expr: If expr is false, it calls assert_failed function
* which reports the name of the source file and the source