斑竹,我参考论坛里一个程序写了个中断的程序,但编译总报错,麻烦帮我看看吧!
//function prototype
void RTI_isr(void);
void main(void) {
/* put your own code here */
CRGINT_RTIE = 1; //允许RTI中断
RTICTL = 0x54; //产生定时中断,中断时间=1/[16MHz/(1*81920)]=5.12ms
EnableInterrupts;
for(;;) {} /* wait forever */
/* please make sure that you never leave this function */
}
#pragma CODE_SEG NON_BANKED
interrupt 7 void RTI_isr(void)
{
CRGFLG_RTIF = 1;//Clear RTI Flag
}
一旦编译就出现下面的报错
Warning:C12004:far calling convertion was ignored for function
Warning:C4200:Other segment than in previous declaration |