为什么我在其他c文件重定义systick中断函数编译不了,而原子的例程却可以,差别在哪,求解

2019-07-21 03:27发布

[mw_shl_code=c,true]#include"delay.h" static __IO u32 time; void SysTick_Init(void) { if(SysTick_Config(SystemCoreClock / 1000)) //??????Systemcoreclock/xxxx????????×°??????SysTick_Config?¨?©???????????????????????????????ò·???0?? { //???????§°??ò·???1?????????????????????°???????????????®?ó????±??¨?±?÷?? while(1); //?ù????????×°?????ó?????????®?ó?????????°?????????????¨?±?÷?? } SysTick->CTRL &= ~ SysTick_CTRL_ENABLE_Msk; } void delay(__IO u32 num) //?????????????????±????????????????×°???????ù?????????±????×°???????¨???????±???????????? { //?????????????????????????????±?¨?±?÷?????????????????®?ó???????±?ê?? time=num; SysTick->CTRL |= SysTick_CTRL_ENABLE_Msk; while(time!=0); } void SysTick_Handler(void) { if(time!=0) { time--; } }[/mw_shl_code] 编译出现的问题是..OBJdelayled.axf: Error: L6200E: Symbol SysTick_Handler multiply defined (by delay.o and stm32f10x_it.o).
我想问的是原子例程里的delay函数也是对 [mw_shl_code=c,true] [mw_shl_code=c,true]void SysTick_Handler(void)[/mw_shl_code] 进行重新定义,而且放在#include "stm32f10x.h"里的 [mw_shl_code=c,true]void SysTick_Handler(void)并没有做任何处理,原子的编译成功,而我的却出现上述错误,求解差别在哪里,怎么解决[/mw_shl_code] [/mw_shl_code]
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。