We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
/* 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;
And why new thread? http://www.keil.com/forum/docs/thread17145.asp