牛卧堂MCU技术交流
标题:
NUC120 TMR0_IRQHandler 编译错误?
[打印本页]
作者:
direrwind
时间:
2015-5-6 03:38
标题:
NUC120 TMR0_IRQHandler 编译错误?
以下是我写的程式码参考新唐范例写的
发觉Complier 出现错误 : 85589.axf: Error: L6200E: Symbol TMR0_IRQHandler multiply defined (by 123.o and drvtimer.o).
请问是我少加了什麽文件或者程式码,麻烦解惑一下,感谢!!
434344322.JPG
(36.87 KB, 下载次数: 336)
下载附件
2015-5-6 03:33 上传
#include "NUC1xx.h"
#include "Driver\DrvGPIO.h"
#include "Driver\DrvTIMER.h"
#include "Driver\DrvSYS.h"
void timer();
main()
{
timer();
while(1)
{
DrvGPIO_SetBit(E_GPA,1);
TIMER0->TCSR.CEN = 1;
DrvGPIO_ClrBit(E_GPA,1);
TIMER0->TCSR.CEN = 1;
}
}
void timer()
{
UNLOCKREG();
SYSCLK->PWRCON.XTL12M_EN = 1;
SYSCLK->CLKSEL0.HCLK_S = 0;
LOCKREG();
DrvGPIO_Open(E_GPA, 1, E_IO_OUTPUT);
DrvGPIO_Open(E_GPA, 0, E_IO_OUTPUT);
DrvGPIO_ClrBit(E_GPA,1);
SYSCLK->CLKSEL1.TMR0_S = 0;
SYSCLK->APBCLK.TMR0_EN =1;
NVIC_DisableIRQ(TMR0_IRQn);
TIMER0->TCSR.MODE=0;
TIMER0->TCSR.PRESCALE=0;
TIMER0->TCMPR=12000000;
TIMER0->TCSR.IE = 1;
TIMER0->TISR.TIF = 1;
NVIC_EnableIRQ(TMR0_IRQn);
}
void TMR0_IRQHandler(void)
{
TIMER0->TISR.TIF =1;
}
作者:
direrwind
时间:
2015-5-6 15:05
抱歉我知道了原来是重複有定义到~
欢迎光临 牛卧堂MCU技术交流 (http://nuvoton-mcu.com/)
Powered by Discuz! X3.2