void CAN_IRQHandler(void) { const uint32_t pconp = LPC_SC->PCONP; /* Reading registers without CAN powered up will cause DABORT exception */ if (pconp & can1_pconp_mask) { CAN_handle_isr(can1); } if (pconp & can2_pconp_mask) { CAN_handle_isr(can2); } }
void CAN_IRQHandler(void) { const uint32_t pconp = LPC_SC->PCONP; /* Reading registers without CAN powered up will cause DABORT exception */ if (pconp & can1_pconp_mask) { const uint32_t c1_ibits = LPC_CAN1->ICR; if (c1_ibits) { CAN_handle_isr(c1_ibits, can1, LPC_CAN1); } } if (pconp & can2_pconp_mask) { const uint32_t c2_ibits = LPC_CAN2->ICR; if (c2_ibits) { CAN_handle_isr(c2_ibits, can2, LPC_CAN2); } } }