Content originally posted in LPCWare by lucasmf004 on Thu Sep 10 21:11:14 MST 2015
Hi! I'm writting you because I can't configure the GPIO function for LPC1769 with LPCOpen. I only want to have as input the pins number 15,16,17,18,23,24,26,26 to use a matrix board, so I need to have them in high state when nothing is connected. My configuration code is the following:
#definePIN_PortLPC_GPIO
#defineTECLADO_Mask0x7878000
void Pin_Init(void)
{
Chip_GPIO_Init(PIN_Port);
Chip_GPIO_SetPortMask(PIN_Port, 0, TECLADO_Mask);
Chip_GPIO_SetDir(PIN_Port, 0, TECLADO_Mask, 0);
}
//This function is to know if the port is well configured. When I ground the pin number 15, for example, it should take change.
void Lee_Pin(void)
{
uint32_tLectura = 0;
Lectura = Chip_GPIO_ReadValue(PIN_Port, 0);
}
I hope you could help me with this. Any one has an example of how configure the GPIO port (not the one that comes with LPCExpresso)
Pd: Sorry for miy english, I'm not a native speaker, I'm from Argentina.