How to read any GPIO in input state

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to read any GPIO in input state

665 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Deepak Bansal on Tue Sep 11 00:11:58 MST 2012
How to read LPC1317 in input state.I didn't find its function in gpio.c.

Also user manual do not have library description.
0 Kudos
Reply
2 Replies

652 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Deepak Bansal on Tue Sep 11 22:19:55 MST 2012
Thanks Gromak

If selected bits are required than
LPC_GPIO[portNum]->MASKED_ACCESS[bitPosi]
can be used.


regards
Deepak
0 Kudos
Reply

652 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ArtjomGromak on Tue Sep 11 06:16:41 MST 2012

Quote: Deepak Bansal
How to read LPC1317 in input state.I didn't find its function in gpio.c.

Also user manual do not have library description.



uint32_t port0_input_state;
port0_input_state=LPC_GPIO0->DATA; // reading inputs from PORT0
0 Kudos
Reply