新手入门
- 积分
- 8
- 金钱
- 8
- 注册时间
- 2019-4-22
- 在线时间
- 2 小时
|
1金钱
我用的芯片是STM8S003F3,用库函数编写定时器1,然后调用中断服务函数:INTERRUPT_HANDLER (TIM1_UPD_OVF_TRG_BRK_IRQHandler,11),我想问的是其中两个参数在哪找的?点击go to defination后转到stm8s.h文件后的代码如下:
#ifdef _IAR_
#define STRINGVECTOR(x) #x
#define VECTOR_ID(x) STRINGVECTOR( vector = (x) )
#define INTERRUPT_HANDLER( a, b ) \
_Pragma( VECTOR_ID( (b)+2 ) ) \
__interrupt void (a)( void )
#define INTERRUPT_HANDLER_TRAP(a) \
_Pragma( VECTOR_ID( 1 ) ) \
__interrupt void (a) (void)
#endif /* _IAR_ */
我看不明白其中a,b 从哪来的?还有编译时出现报错:Error[Li006]: duplicate definitions for "TIM1_UPD_OVF_TRG_BRK_IRQHandler"; in "C:\Users\LV\Desktop\DCelectric blankets program\Debug\Obj\stm8s_it.o", and "C:\Users\LV\Desktop\DCelectric blankets program\Debug\Obj\timer.o"
Error[Li006]: duplicate definitions for "_interrupt_13"; in "C:\Users\LV\Desktop\DCelectric blankets program\Debug\Obj\stm8s_it.o", and "C:\Users\LV\Desktop\
DCelectric blankets program\Debug\Obj\timer.o"
不知是什么原因?
|
|