/* * interrupt handler for all pins on ports C and D */ void PORTCD_IRQHandler() { int i = 0; //check all portc sources for(i = 0; i < 32; i++) { if((PORTC_PCR(i) & PORT_PCR_ISF_MASK) == PORT_PCR_ISF_MASK) { //clear interrupt PORTC_PCR(i) |= PORT_PCR_ISF_MASK; if(gpio_c_callback[i]) { gpio_c_callback[i](); } } } //check all portd sources for(i = 0; i < 32; i++) { if((PORTD_PCR(i) & PORT_PCR_ISF_MASK) == PORT_PCR_ISF_MASK) { PORTD_PCR(i) |= PORT_PCR_ISF_MASK; if(gpio_d_callback[i]) { gpio_d_callback[i](); } } } }
0x0000 /* porte */ }; GPIO_PIN_MAP gpio_global_irq_map = { 0x0000, /* porta */ 0x0000, /* portb */ 0x0000, /* portc */ 0x0000, /* portd */ 0x0000 /* porte */ }; static uint32_t volatile * const pctl_ptr_arr[] = { &(PORTA_PCR(0)), &(PORTB_PCR(0)), &(PORTC_PCR(0)), &(PORTD_PCR(0)), &(PORTE_PCR(0)) }; const static uint_8 _port_int_prio[] = { BSP_PORTA_INT_LEVEL, BSP_PORTB_INT_LEVEL, BSP_PORTC_INT_LEVEL, BSP_PORTD_INT_LEVEL, BSP_PORTE_INT_LEVEL, }; extern GPIO_DEV_DATA_PTR first_irq; /* first file having used IRQ */ static _mqx_int install_isr( MQX_FILE_PTR ); static uint_32 get_irq_mask( boolean n, boolean p, boolean l);