Original Attachment has been moved to: GPIO%20Interrupt.rar
I have used GPIO interrupt with the following code:
LPC_IOCON->P2_9 = 0x30; // Setup P2.9 as Input with Hysterese
// Interrupts for Rising AND falling edge
LPC_GPIOINT->IO2IntEnR = (1 << 9);
LPC_GPIOINT->IO2IntEnF = (1 << 9);
// Enable Interrupt
NVIC_EnableIRQ(GPIO_IRQn);
void __attribute__ ((interrupt)) GPIO_IRQHandler(void)
{
// do something
// Reset all Interrupt Flags
LPC_GPIOINT->IO0IntClr = 0xFFFFFFFF;
LPC_GPIOINT->IO2IntClr = 0xFFFFFFFF;
}