中断程序的问题
#define EnableIrq(bit) rINTMSK &= ~(bit)#define DisableIrq(bit) rINTMSK |= (bit)
void KeyScan_Test(void)
{
Uart_Printf("\nKey Scan Test, press ESC key to exit !\n");
rGPGCON = rGPGCON & (~((3<<22)|(3<<6)|(3<<0)|(3<<10)|(3<<12)|(3<<14))) |
((2<<22)|(2<<6)|(2<<0)|(2<<10)|(2<<12)|(2<<14)) ; //GPG11,3 set EINT
rEXTINT1 &= ~(7|(7<<0));
rEXTINT1 |= (0|(0<<0)); //set eint8 falling edge int
rEXTINT1 &= ~(7<<12);
rEXTINT1 |= (0<<12); //set eint11 falling edge int
rEXTINT1 &= ~(7<<20);
rEXTINT1 |= (0<<20); //set eint13 falling edge int
rEXTINT1 &= ~(7<<24);
rEXTINT1 |= (0<<24); //set eint14 falling edge int
rEXTINT1 &= ~(7<<28);
rEXTINT1 |= (0<<28); //set eint15 falling edge int
rEXTINT2 &= ~(0xf<<12);
rEXTINT2 |= (0<<12); //set eint19 falling edge int
rEINTPEND |= (1<<8)|(1<<11)|(1<<13)|(1<<14)|(1<<15)|(1<<19); //clear eint 11,19
rEINTMASK &= ~((1<<8)|(1<<11)|(1<<13)|(1<<14)|(1<<15)|(1<<19)); //enable eint11,19
ClearPending(BIT_EINT0|BIT_EINT2|BIT_EINT8_23);
pISR_EINT0 = pISR_EINT2 = pISR_EINT8_23 = (U32)Key_ISR;
EnableIrq(BIT_EINT0|BIT_EINT2|BIT_EINT8_23);
while( Uart_GetKey() != ESC_KEY ) ;
DisableIrq(BIT_EINT0|BIT_EINT2|BIT_EINT8_23);
}