LPC1114 gpio problem

Started by Nishant Agrawal May 17, 2011
Hello everyone,

I am trying to use LPC1114 with Keil. The GPIO ports masked access does not
seem to be working. I might be doing it all wrong so here is the code for
output on port GPIO 0 bits 2,3 and 4.

LPC_GPIO0->DIR |= (1<<2) | (1<<3) | (1<<4);
LPC_GPIO0->MASKED_ACCESS[(1<<2) | (1<<3) | (1<<4)] = 0x0FFF;

In the above code only bits 2,3 and 4 should be set but it seems as if all
the pins are set so masked access does not seem to be working.
Please let me know what I am doing wrong.

--
With Regards,
Nishant Agrawal

An Engineer's Guide to the LPC2100 Series