if (
ti_1)
{
// UART1 transmit interrupt has occured
// USER CODE BEGIN (SHINT_XINTR8Isr,6)
UART1_vSendData8
(counter[a]);
a++;
if(a==10)
EA=0;
// USER CODE END
}
(keil软件中编写的)在xc886的UART1中断函数
void SHINT_viXINTR8Isr(void)中写入上面这么一段程序,编译后出现SHARED_INT.C(210): error C216: subscript on non-array or too many dimensions(数组counter定义,维数等基本语法没错误)
随意改成下面之后,编译就通过了:
if (TI_1)
{
// UART1 transmit interrupt has occured
// USER CODE BEGIN (SHINT_XINTR8Isr,6)
UART1_vSendData8
(counter);
a++;
if(a==10)
EA=0;
// USER CODE END
}
给人感觉就是中断函数中不能用数组?
请问大侠们为什么出现这种情况?
一周热门 更多>