请问一下大家有没有遇到,pic单片机中断入口函数编译失败?(在xc8编译器手册例程里的也不行)
void __interrupt tc_int(void)
{
if (TMR0IE && TMR0IF)
{ TMR0IF=0;
++tick_count;
return;
}
// process other interrupt sources here, if required
}
中断函数一直编译失败。注释掉编译就可以通过。这段代码来自于xc8编译器手册里的。
编译器输出的信息为:
lock.c:94:6: error: variable has incomplete type 'void'
void interrupt tc_int(void)
lock.c:94:15: error: expected ';' after top level declarator
void interrupt tc_int(void)
求前辈帮忙解答一下,非常感谢。
开发环境为 MPLAB X IDE v5.10;
编译器为:xc8 2.00版