GPIO vs IOCON

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

GPIO vs IOCON

1,927 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by 82santrino on Thu Nov 07 10:18:17 MST 2013
Excuse me for my question, that will seem so silly to most of you, but I entered in NXP world form one week (and I come from AVR-BASCOM)
I studied system and clock control for my lpc1788, and now I want understand this:
in lpc177x_8x.h file, there is the memory map for the device, and there are declared LPC_IOCON and LPC_GPIO structs.
Can anyone explain me, the difference between the two structure?
I want understand, if for example, I want drive one led, one output pin...
I can change the state of this pin so "LPC_IOCON->P1_18=1" or "LPC_IOCON->P1_18=0"
but I can also "LPC_GPIO1->SET=(mask for 18)" or "LPC_GPIO1->CLR=(mask for 18)"
Thanks
ale
标签 (1)
1 回复

1,294 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Thu Nov 07 10:58:28 MST 2013
UM10470 http://www.nxp.com/documents/user_manual/UM10470.pdf

is describing that in

Chapter 8: LPC178x/7x I/O configuration

and

Chapter 9: LPC178x/7x GPIO

IOCON is the configuration structure for this pin, GPIO is just the GPIO structure (which is only relevant if your IOCON has set this pin to GPIO) :)