I am using TM4C129EXL launchpad, I am trying to using the regular GPIO as a edge detector, I checked the NVIC, the port P and Port Q has the specific ISR for specific pin, is there any other way? I knew we can check on the interrupt raw status register to detect which pin actually trig the interrupt?
the reason I ask the question is if I use the portJ it always give me it is the first pin trigger the interrupt even I actually click the second pin. here is the code I use for the ISR
void GPIOjIntHandler(void) { uint32_t status_int; status_int=GPIOIntStatus(GPIO_PORTJ_BASE,true); MAP_GPIOIntClear(GPIO_PORTJ_AHB_BASE,GPIO_INT_PIN_0); MAP_GPIOIntClear(GPIO_PORTJ_AHB_BASE,GPIO_INT_PIN_1); if(status_int&0x01) { LEDWrite(CLP_D1, 1); } else if (status_int&0x02) { LEDWrite(CLP_D1, 0); } else { } }