39 static void (*tmr_isr_funcs[4])(void) = {
46 void irq_register_timer_handler(
int timer,
void (*isr)(
void))
48 tmr_isr_funcs[timer] = isr;
58 while ((pending = *NIPEND)) {
60 if(bit_is_set(pending, INT_NUM_TMR)) {
65 if (tmr_isr_funcs[0] != 0) { (tmr_isr_funcs[0])(); }
66 if (tmr_isr_funcs[1] != 0) { (tmr_isr_funcs[1])(); }
67 if (tmr_isr_funcs[2] != 0) { (tmr_isr_funcs[2])(); }
68 if (tmr_isr_funcs[3] != 0) { (tmr_isr_funcs[3])(); }
71 if(bit_is_set(pending, INT_NUM_MACA)) {
72 if(maca_isr != 0) { maca_isr(); }
74 if(bit_is_set(pending, INT_NUM_UART1)) {
75 if(uart1_isr != 0) { uart1_isr(); }
77 if(bit_is_set(pending, INT_NUM_UART2)) {
78 if(uart2_isr != 0) { uart2_isr(); }
80 if(bit_is_set(pending, INT_NUM_CRM)) {
81 if(rtc_wu_evt() && (rtc_isr != 0)) { rtc_isr(); }
82 if(kbi_evnt(4) && (kbi4_isr != 0)) { kbi4_isr(); }
83 if(kbi_evnt(5) && (kbi5_isr != 0)) { kbi5_isr(); }
84 if(kbi_evnt(6) && (kbi6_isr != 0)) { kbi6_isr(); }
85 if(kbi_evnt(7) && (kbi7_isr != 0)) { kbi7_isr(); }
87 if (CRM->STATUSbits.CAL_DONE && CRM->CAL_CNTLbits.CAL_IEN && cal_isr)
89 CRM->STATUSbits.CAL_DONE = 0;
93 if(bit_is_set(pending, INT_NUM_ASM)) {
94 if(asm_isr != 0) { asm_isr(); }
96 if (bit_is_set(pending, INT_NUM_I2C)) {
97 if (i2c_isr != 0) { i2c_isr(); }