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
{
}
} |