LPC1769 Read in GPIO pins

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by Blogs on Mon Jun 11 18:39:32 MST 2012
Hi there,
I would like to know how to read in pin when they are set as GPIO inputs.

I have set the internal resistor as pull down.

I would like to input a voltage at a certain pin (eg. P0.11) and when trying to read the pin, it should say high at pin P0.11.

I understand that you use FIOPIN to read in values? Is that correct, and how do you use it?

So this is all I've done so far:
LPC_GPIO0->FIODIR = (0 << 11);
LPC_GPIO0->FIOPIN = (0 << 11);