/* use port2_1 as input event, interrupt test. */ GPIOSetDir( PORT2, 1, 0 ); /* port2_1, single trigger, active high. */ GPIOSetInterrupt( PORT2, 1, 1, 0, 0 ); GPIOIntEnable( PORT2, 1 ); while( 1 ) { if ( GPIOIntStatus( PORT2, 1 )==1 ) { i++; GPIOIntClear( PORT2, 1 ); } } <code> 12121212341234 </endcode> PORT2: if ( LPC_GPIO2->MIS & (0x1<<bitPosi) ) regVal = 1;
but not very nicely formatted, eh?
And why new thread? http://www.keil.com/forum/docs/thread17145.asp