|
发表于 2013-9-3 08:43:06
|
显示全部楼层
楼主按照这个试试,一定要参考手册
RETAILMSG(1,(TEXT("Key_Gpio_Setting----\r\n")));
//v_pIOPregs->GPLPUD &= ~(0x0fff);
v_pIOPregs->GPLCON1 &= ~(0xf);
v_pIOPregs->GPLCON1 |= 0x3;
//v_pIOPregs->GPLDAT |= 0x1;
RETAILMSG(1,(TEXT("******* v_pIOPregs->GPLCON1 = %x\r\n"),v_pIOPregs->GPLCON1));
RETAILMSG(1,(TEXT("******* v_pIOPregs->GPLDAT = %x\r\n"),v_pIOPregs->GPLDAT));
v_pIOPregs->EINT0CON1 &= ~(0xf);
v_pIOPregs->EINT0CON1 |= ~(0x9);
v_pIOPregs->EINT0MASK &= ~(0x10000) ;
RETAILMSG(1,(TEXT("******* v_pIOPregs->EINT0CON1 = %x\r\n"),v_pIOPregs->EINT0CON1));
RETAILMSG(1,(TEXT("******* v_pIOPregs->EINT0MASK = %x\r\n"),v_pIOPregs->EINT0MASK)); |
|