AnsweredAssumed Answered

Difference between FIOPIN and FIOSET

Question asked by m n on Jan 25, 2019
Latest reply on Jan 26, 2019 by m n

Hi, I want to know what is the difference between

LPC_GPIO1->FIODIR=0x00000001;

LPC_GPIO1->FIOSET=0x00000001;

and

LPC_GPIO1->FIODIR=0x00000001;

LPC_GPIO1->FIOPIN=0x00000001;

 

The first, set P1[0] to output and also drives 1 to it. The second also set P1[0] to output and writes 1 (vdd) to that and 0 to other pins.

So, both are driving vdd to P1[0]. Is that right?

Is there any technical difference here or it is a programming habit?!

Outcomes