[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]
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
一周热门 更多>