断言机制assert_param的使用

本文详细介绍了STM32固件库中的断言机制,包括assert_param宏的定义及用法,阐述了如何在调试阶段利用断言快速定位参数错误,以及在不同编译模式下断言的行为变化。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

具体的定义和用法在下面
void MY_NVIC_SetVectorTable(u32 NVIC_VectTab,u32 Offset)
{
  assert_param(IS_NVIC_VECTTAB(NVIC_VectTab));
  assert_param(IS_NVIC_OFFSET(Offset));
  SCB->VTOR=NVIC_VectTab|(Offset&(u32)0x1FFFFF80);
}
答案:这是断言机制。意思是在关闭断言的情况下,
void MY_NVIC_SetVectorTable(u32 NVIC_VectTab,u32 Offset)
{
  assert_param(IS_NVIC_VECTTAB(NVIC_VectTab));
  assert_param(IS_NVIC_OFFSET(Offset));
  SCB->VTOR=NVIC_VectTab|(Offset&(u32)0x1FFFFF80);
}
就相当于:
void MY_NVIC_SetVectorTable(u32 NVIC_VectTab,u32 Offset)
{
  (void)0; // 不执行任何操作,对程序也没有副作用
  (void)0; // 不执行任何操作,对程序也没有副作用
  SCB->VTOR=NVIC_VectTab|(Offset&(u32)0x1FFFFF80);
}
由于你的这个断言没贴完整,我就拿VC++6.0下的断言来说明把。
在VC++6.0下的assert.h中:
#ifdef  NDEBUG 
#define assert(exp)     ((void)0)
#else
#define assert(exp) (void)( (exp) || (_assert(#exp, __FILE__, __LINE__), 0) )
如果你写的代码中使用了断言,比如:
assert(i>=0);
那么这句的在程序中的作用分两种情况:
1. 若果在assert.h被包含之前NDEBUG这个宏未定义,assert(exp) 就被定义为(void)( (exp) || (_assert(#exp, __FILE__, __LINE__), 0) )。这样当i<0时,i>=0这个表达式为假,所以程序就会终止。并通知程序员发生错误的文件位置和代码行。但是错误信息仅仅对程序员有用。对用户来说,程序异常终止就显得不是那么友好了(用户此时需要的是挽回错误)。所以在发布给用户的程序中,assert(断言)要关闭。在VC++6.0下这是通过在包含assert.h头文件之前定义NDEBUG实现的。
2.在定义了NDEBUG的情况下,断言不应该给程序带来副作用。这样断言就被定义为:
#define assert(exp)     ((void)0)
此时,assert(i>=0);不管括号中表达式为真还是为假,这一行代码其实相当于:

NULL;意思是不执行任何操作。

在固件库中,它的作用就是检测传递给函数的参数是否是有效的参数。
所谓有效的参数是指满足规定范围的参数,比如某个参数的取值范围只能是小于3的正整数,如果给出的参数大于3,
则这个assert_param()可以在运行的程序调用到这个函数时报告错误,使程序员可以及时发现错误,而不必等到程序运行结果的错误而大费周折。

这是一种常见的软件技术,可以在调试阶段帮助程序员快速地排除那些明显的错误。

它确实在程序的运行上牺牲了效率(但只是在调试阶段),但在项目的开发上却帮助你提高了效率。

当你的项目开发成功,使用release模式编译之后,或在stm32f10x_conf.h文件中注释掉对USE_FULL_ASSERT的宏定义,所有的assert_param()检验都消失了,不会影响最终程序的运行效率。

#define assert_param(expr) ((expr) ? (void)0 : assert_failed((u8 *)__FILE__, __LINE__))
。。。

assert_param(IS_ADC_ALL_PERIPH(ADCx));
。。。

在执行assert_param()的检验时,如果发现参数出错,它会调用函数assert_failed()向程序员报告错误,在任何一个例程中的main.c中都有这个函数的模板,如下:

void assert_failed(uint8_t* file, uint32_t line)
{


while (1)
{}
}

你可以按照自己使用的环境需求,添加适当的语句输出错误的信息提示,或修改这个函数做出适当的错误处理。

Build started: Project: iSO-STM32 *** Using Compiler 'V5.06 update 6 (build 750)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin' Build target '代码模板' compiling main.c... ..\..\User\main.c(3): error: #5: cannot open source input file "lcd.h": No such file or directory #include "lcd.h" ..\..\User\main.c: 0 warnings, 1 error compiling system_stm32f10x.c... compiling misc.c... ..\..\Libraries\FWlib\src\misc.c(99): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_NVIC_PRIORITY_GROUP(NVIC_PriorityGroup)); ..\..\Libraries\FWlib\src\misc.c(117): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_FUNCTIONAL_STATE(NVIC_InitStruct->NVIC_IRQChannelCmd)); ..\..\Libraries\FWlib\src\misc.c(159): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_NVIC_VECTTAB(NVIC_VectTab)); ..\..\Libraries\FWlib\src\misc.c(178): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_NVIC_LP(LowPowerMode)); ..\..\Libraries\FWlib\src\misc.c(202): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_SYSTICK_CLK_SOURCE(SysTick_CLKSource)); ..\..\Libraries\FWlib\src\misc.c: 5 warnings, 0 errors compiling stm32f10x_rcc.c... ..\..\Libraries\FWlib\src\stm32f10x_rcc.c(273): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_RCC_HSE(RCC_HSE)); ..\..\Libraries\FWlib\src\stm32f10x_rcc.c(338): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_RCC_CALIBRATION_VALUE(HSICalibrationValue)); ..\..\Libraries\FWlib\src\stm32f10x_rcc.c(357): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_FUNCTIONAL_STATE(NewState)); ..\..\Libraries\FWlib\src\stm32f10x_rcc.c(383): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_RCC_PLL_SOURCE(RCC_PLLSource)); ..\..\Libraries\FWlib\src\stm32f10x_rcc.c(404): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_FUNCTIONAL_STATE(NewState)); ..\..\Libraries\FWlib\src\stm32f10x_rcc.c(568): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_RCC_SYSCLK_SOURCE(RCC_SYSCLKSource)); ..\..\Libraries\FWlib\src\stm32f10x_rcc.c(612): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_RCC_HCLK(RCC_SYSCLK)); ..\..\Libraries\FWlib\src\stm32f10x_rcc.c(638): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_RCC_PCLK(RCC_HCLK)); ..\..\Libraries\FWlib\src\stm32f10x_rcc.c(664): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_RCC_PCLK(RCC_HCLK)); ..\..\Libraries\FWlib\src\stm32f10x_rcc.c(703): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_RCC_IT(RCC_IT)); ..\..\Libraries\FWlib\src\stm32f10x_rcc.c(731): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_RCC_USBCLK_SOURCE(RCC_USBCLKSource)); ..\..\Libraries\FWlib\src\stm32f10x_rcc.c(770): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_RCC_ADCCLK(RCC_PCLK2)); ..\..\Libraries\FWlib\src\stm32f10x_rcc.c(832): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_RCC_LSE(RCC_LSE)); ..\..\Libraries\FWlib\src\stm32f10x_rcc.c(865): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_FUNCTIONAL_STATE(NewState)); ..\..\Libraries\FWlib\src\stm32f10x_rcc.c(882): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_RCC_RTCCLK_SOURCE(RCC_RTCCLKSource)); ..\..\Libraries\FWlib\src\stm32f10x_rcc.c(896): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_FUNCTIONAL_STATE(NewState)); ..\..\Libraries\FWlib\src\stm32f10x_rcc.c(1067): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_RCC_AHB_PERIPH(RCC_AHBPeriph)); ..\..\Libraries\FWlib\src\stm32f10x_rcc.c(1098): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_RCC_APB2_PERIPH(RCC_APB2Periph)); ..\..\Libraries\FWlib\src\stm32f10x_rcc.c(1129): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_RCC_APB1_PERIPH(RCC_APB1Periph)); ..\..\Libraries\FWlib\src\stm32f10x_rcc.c(1188): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_RCC_APB2_PERIPH(RCC_APB2Periph)); ..\..\Libraries\FWlib\src\stm32f10x_rcc.c(1219): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_RCC_APB1_PERIPH(RCC_APB1Periph)); ..\..\Libraries\FWlib\src\stm32f10x_rcc.c(1240): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_FUNCTIONAL_STATE(NewState)); ..\..\Libraries\FWlib\src\stm32f10x_rcc.c(1253): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_FUNCTIONAL_STATE(NewState)); ..\..\Libraries\FWlib\src\stm32f10x_rcc.c(1285): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_RCC_MCO(RCC_MCO)); ..\..\Libraries\FWlib\src\stm32f10x_rcc.c(1332): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_RCC_FLAG(RCC_FLAG)); ..\..\Libraries\FWlib\src\stm32f10x_rcc.c(1406): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_RCC_GET_IT(RCC_IT)); ..\..\Libraries\FWlib\src\stm32f10x_rcc.c(1451): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_RCC_CLEAR_IT(RCC_IT)); ..\..\Libraries\FWlib\src\stm32f10x_rcc.c: 27 warnings, 0 errors compiling stm32f10x_gpio.c... ..\..\Libraries\src\stm32f10x_gpio.c(111): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); ..\..\Libraries\src\stm32f10x_gpio.c(178): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); ..\..\Libraries\src\stm32f10x_gpio.c(286): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); ..\..\Libraries\src\stm32f10x_gpio.c(308): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); ..\..\Libraries\src\stm32f10x_gpio.c(324): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); ..\..\Libraries\src\stm32f10x_gpio.c(346): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); ..\..\Libraries\src\stm32f10x_gpio.c(361): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); ..\..\Libraries\src\stm32f10x_gpio.c(377): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); ..\..\Libraries\src\stm32f10x_gpio.c(397): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); ..\..\Libraries\src\stm32f10x_gpio.c(420): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); ..\..\Libraries\src\stm32f10x_gpio.c(437): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); ..\..\Libraries\src\stm32f10x_gpio.c(466): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_GPIO_EVENTOUT_PORT_SOURCE(GPIO_PortSource)); ..\..\Libraries\src\stm32f10x_gpio.c(486): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_FUNCTIONAL_STATE(NewState)); ..\..\Libraries\src\stm32f10x_gpio.c(554): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_GPIO_REMAP(GPIO_Remap)); ..\..\Libraries\src\stm32f10x_gpio.c(613): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_GPIO_EXTI_PORT_SOURCE(GPIO_PortSource)); ..\..\Libraries\src\stm32f10x_gpio.c(632): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_GPIO_ETH_MEDIA_INTERFACE(GPIO_ETH_MediaInterface)); ..\..\Libraries\src\stm32f10x_gpio.c: 16 warnings, 0 errors compiling stm32f10x_rcc.c... ..\..\Libraries\src\stm32f10x_rcc.c(273): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_RCC_HSE(RCC_HSE)); ..\..\Libraries\src\stm32f10x_rcc.c(338): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_RCC_CALIBRATION_VALUE(HSICalibrationValue)); ..\..\Libraries\src\stm32f10x_rcc.c(357): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_FUNCTIONAL_STATE(NewState)); ..\..\Libraries\src\stm32f10x_rcc.c(383): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_RCC_PLL_SOURCE(RCC_PLLSource)); ..\..\Libraries\src\stm32f10x_rcc.c(404): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_FUNCTIONAL_STATE(NewState)); ..\..\Libraries\src\stm32f10x_rcc.c(568): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_RCC_SYSCLK_SOURCE(RCC_SYSCLKSource)); ..\..\Libraries\src\stm32f10x_rcc.c(612): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_RCC_HCLK(RCC_SYSCLK)); ..\..\Libraries\src\stm32f10x_rcc.c(638): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_RCC_PCLK(RCC_HCLK)); ..\..\Libraries\src\stm32f10x_rcc.c(664): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_RCC_PCLK(RCC_HCLK)); ..\..\Libraries\src\stm32f10x_rcc.c(703): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_RCC_IT(RCC_IT)); ..\..\Libraries\src\stm32f10x_rcc.c(731): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_RCC_USBCLK_SOURCE(RCC_USBCLKSource)); ..\..\Libraries\src\stm32f10x_rcc.c(770): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_RCC_ADCCLK(RCC_PCLK2)); ..\..\Libraries\src\stm32f10x_rcc.c(832): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_RCC_LSE(RCC_LSE)); ..\..\Libraries\src\stm32f10x_rcc.c(865): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_FUNCTIONAL_STATE(NewState)); ..\..\Libraries\src\stm32f10x_rcc.c(882): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_RCC_RTCCLK_SOURCE(RCC_RTCCLKSource)); ..\..\Libraries\src\stm32f10x_rcc.c(896): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_FUNCTIONAL_STATE(NewState)); ..\..\Libraries\src\stm32f10x_rcc.c(1067): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_RCC_AHB_PERIPH(RCC_AHBPeriph)); ..\..\Libraries\src\stm32f10x_rcc.c(1098): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_RCC_APB2_PERIPH(RCC_APB2Periph)); ..\..\Libraries\src\stm32f10x_rcc.c(1129): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_RCC_APB1_PERIPH(RCC_APB1Periph)); ..\..\Libraries\src\stm32f10x_rcc.c(1188): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_RCC_APB2_PERIPH(RCC_APB2Periph)); ..\..\Libraries\src\stm32f10x_rcc.c(1219): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_RCC_APB1_PERIPH(RCC_APB1Periph)); ..\..\Libraries\src\stm32f10x_rcc.c(1240): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_FUNCTIONAL_STATE(NewState)); ..\..\Libraries\src\stm32f10x_rcc.c(1253): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_FUNCTIONAL_STATE(NewState)); ..\..\Libraries\src\stm32f10x_rcc.c(1285): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_RCC_MCO(RCC_MCO)); ..\..\Libraries\src\stm32f10x_rcc.c(1332): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_RCC_FLAG(RCC_FLAG)); ..\..\Libraries\src\stm32f10x_rcc.c(1406): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_RCC_GET_IT(RCC_IT)); ..\..\Libraries\src\stm32f10x_rcc.c(1451): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_RCC_CLEAR_IT(RCC_IT)); ..\..\Libraries\src\stm32f10x_rcc.c: 27 warnings, 0 errors compiling stm32f10x_gpio.c... ..\..\Libraries\FWlib\src\stm32f10x_gpio.c(111): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); ..\..\Libraries\FWlib\src\stm32f10x_gpio.c(178): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); ..\..\Libraries\FWlib\src\stm32f10x_gpio.c(286): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); ..\..\Libraries\FWlib\src\stm32f10x_gpio.c(308): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); ..\..\Libraries\FWlib\src\stm32f10x_gpio.c(324): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); ..\..\Libraries\FWlib\src\stm32f10x_gpio.c(346): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); ..\..\Libraries\FWlib\src\stm32f10x_gpio.c(361): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); ..\..\Libraries\FWlib\src\stm32f10x_gpio.c(377): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); ..\..\Libraries\FWlib\src\stm32f10x_gpio.c(397): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); ..\..\Libraries\FWlib\src\stm32f10x_gpio.c(420): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); ..\..\Libraries\FWlib\src\stm32f10x_gpio.c(437): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); ..\..\Libraries\FWlib\src\stm32f10x_gpio.c(466): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_GPIO_EVENTOUT_PORT_SOURCE(GPIO_PortSource)); ..\..\Libraries\FWlib\src\stm32f10x_gpio.c(486): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_FUNCTIONAL_STATE(NewState)); ..\..\Libraries\FWlib\src\stm32f10x_gpio.c(554): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_GPIO_REMAP(GPIO_Remap)); ..\..\Libraries\FWlib\src\stm32f10x_gpio.c(613): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_GPIO_EXTI_PORT_SOURCE(GPIO_PortSource)); ..\..\Libraries\FWlib\src\stm32f10x_gpio.c(632): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_GPIO_ETH_MEDIA_INTERFACE(GPIO_ETH_MediaInterface)); ..\..\Libraries\FWlib\src\stm32f10x_gpio.c: 16 warnings, 0 errors compiling core_cm3.c... compiling stm32f10x_tim.c... ..\..\Libraries\src\stm32f10x_tim.c(125): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_ALL_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(231): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_ALL_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(284): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST8_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(367): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST6_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(449): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST3_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(528): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST3_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(590): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_CHANNEL(TIM_ICInitStruct->TIM_Channel)); ..\..\Libraries\src\stm32f10x_tim.c(659): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST6_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(715): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST2_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(809): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_ALL_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(834): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST2_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(875): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_ALL_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(912): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_ALL_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(940): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST4_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(967): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST9_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(992): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST6_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(1011): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST6_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(1039): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST6_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(1080): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST3_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(1121): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST3_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(1153): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST3_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(1179): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_ALL_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(1203): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST3_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(1233): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST6_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(1272): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST5_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(1319): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST8_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(1343): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST6_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(1367): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST3_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(1391): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST3_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(1412): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_ALL_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(1436): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST2_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(1461): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST4_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(1486): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST5_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(1513): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST8_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(1538): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST6_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(1562): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST3_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(1586): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST3_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(1610): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST8_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(1636): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST6_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(1661): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST3_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(1686): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST3_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(1711): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST3_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(1737): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST3_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(1761): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST3_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(1785): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST3_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(1809): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST8_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(1832): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST2_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(1856): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST6_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(1879): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST1_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(1903): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST3_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(1927): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST1_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(1951): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST3_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(1979): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST8_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(2009): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST2_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(2051): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST8_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(2095): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_ALL_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(2123): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_ALL_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(2147): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST6_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(2173): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_ALL_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(2205): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST7_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(2228): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST6_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(2249): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST6_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(2267): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_ALL_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(2281): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_ALL_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(2295): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST8_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(2309): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST6_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(2323): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST3_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(2337): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST3_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(2356): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST8_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(2378): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST6_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(2400): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST3_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(2422): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST3_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(2444): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST8_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(2460): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST8_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(2473): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST6_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(2486): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST3_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(2499): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_LIST3_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(2512): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_ALL_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(2525): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_ALL_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(2560): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_ALL_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(2603): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_ALL_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(2637): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_ALL_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c(2679): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_TIM_ALL_PERIPH(TIMx)); ..\..\Libraries\src\stm32f10x_tim.c: 83 warnings, 0 errors "..\..\Output\Hex_ZH.axf" - 1 Error(s), 174 Warning(s). Target not created. Build Time Elapsed: 00:00:02
最新发布
05-31
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值