Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
Interestingly, the new PortOut function still isn't fast enough for my application. So I grabbed my old code that worked. But I can't understand why I need to call every time:
LPC_GPIO0->FIOMASK = ~(NT2_N|NT2_P);
otherwise the voltage level on the pins can't be set correctly, if I just set the mask once.
I must have copied it from someone else's example.
Please help.
#define NT2_N (1<<9) //DIP5
#define NT2_P (1<<10) //DIP28
void NT2_HIGH() {
LPC_GPIO0->FIOMASK = ~(NT2_N|NT2_P);
LPC_GPIO0->FIOPIN = (NT2_N|NT2_P); //11
}