Fast GPIO [ 16bit version]

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

Fast GPIO [ 16bit version]

496 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bobi-one on Wed Jun 08 11:51:48 MST 2011
What is the fastest way to put some 16 bit value on port 2 and 3 of the lpc1343?
this is the way I'm doing it.
void Write16(unsigned int data)
{
LPC_GPIO2->MASKED_ACCESS[0xFFF] = data;
LPC_GPIO3->MASKED_ACCESS[0x00F] = data >> 12;
}
0 Kudos
Reply
1 Reply

483 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by igorsk on Thu Jun 09 06:03:39 MST 2011
That's probably the fastest way to do it.
0 Kudos
Reply