If you mean declaring the interrupt handler for the EINT2 pin, yes, it will (please note that EINT2 is not connected on the mbed board; you'd have to solder your wire directly to the chip).
If you mean using EINT2 as a handler for another GPIO interrupt, it doesn't work like that. All GPIO interrupts will arrive to the GPIO (=EINT3) handler. You will need to check the interrupt status register to distinguish them. E.g. (stolen from John Robbins):
// check if we have rising edge interrupt on P0.24
if ( LPC_GPIOINT->IO0IntStatR & (1 << 24) )
{
// turn on P1.18 = LED1
LPC_GPIO1->FIOSET = 1<<18;
// clear P0.24 interrupt
LPC_GPIOINT->IO0IntClr = (1<<24);
// turn off LED1
LPC_GPIO1->FIOCLR = 1<<18;
}
For details, see "GPIO Interrupt Registers" in the user manual (Chapter 9, 5.6).
HI,
I was reading the GPIO section in the user manual (section 5.6 specifially) and there is mention of interrupting on any pin in any state (rise/fall). I know that the library allow for this but I am more interested in where this handler is located. In the file startup_LPC17xx.s I see the default handler for EINT0...3 but those seem to be only for certian pins. Any help would be appreciated. I would like to write my own handler that is not depentant on the mbed library. Thanks!