Lpc11c24 gpio

Discussion created by lpcware Employee on Jun 15, 2016
Content originally posted in LPCWare by raj on Thu May 02 07:47:05 MST 2013
IN LPC11C24 I want configure a few gpio's in different ports as input at particular time and then change it to output vice versa. it should change as input then read a value and switch to output to deliver a value. I used GPIOSetDir(0,1,0) and configured but how to read the value. i did so
unsigned char c;
c = ((LPC_GPIO0->DATA )& 0x0002)>>1;

but i did not get read value in c.

if i switch from input to output the port pins are not delivering the values.

adv thanks for your valuable suggestions.