void
CANIntHandler(void)
{
unsigned long ulStatus;
ulStatus = CANIntStatus(CAN0_BASE, CAN_INT_STS_CAUSE);
if(ulStatus == CAN_INT_INTID_STATUS)
{
ulStatus = CANStatusGet(CAN0_BASE, CAN_STS_CONTROL);
g_bErrFlag = 1;
}
else if(ulStatus == 1)
{
CANIntClear(CAN0_BASE, 1);
g_ulMsg1Count++;
g_bErrFlag = 0;
}
else
{
}
}
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
一周热门 更多>