Use the port easy

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

Use the port easy

277 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by thinkchip on Thu Jul 01 18:42:06 MST 2010
Hi, I see in the examples of gpio, that I have no call a function to put a value in one pin, but I cant see why I could put PORT2=0x0ff; our data= PORT2
in the first example I see a way, like this
#define LCD_DATA(Data)      LPC_GPIO[PORT2]->MASKED_ACCESS[(0x00FF)] = Data //P2.0-7 = Data
but in the other example, How I could ask for the entire value of the port, I asked this, because I make a driver for a GLCD 128x64, best regards

Original Attachment has been moved to: 1100509_ssp_spi.zip

0 Kudos
1 Reply

234 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by igorsk on Fri Jul 02 12:24:36 MST 2010
Use the DATA member if you wand the complete unmasked value.

LPC_GPIO[PORT2]->DATA
0 Kudos