Hi,
What is the difference between the gpio flags "GPIO_OUTPUT_ACTIVE" and "GPIO_OUTPUT_HIGH"..?
They both do the same thing..?
Thanks,
Hi,
What is the difference between the gpio flags "GPIO_OUTPUT_ACTIVE" and "GPIO_OUTPUT_HIGH"..?
They both do the same thing..?
Thanks,
Hi Ubaid,
Sometimes it's useful to define your GPIO's logical "1" level to be the low voltage state, and the logical "0" level to be the high voltage state. This configuration is called "active low" - opposite of the usual which is "active high"
So, the GPIO API offers alternative options to set a pin output level:
GPIO_OUTPUT_HIGH will let you configure a pin as output and immediately set it to a "high voltage" state (regardless of whether that means logical 1 or 0).
GPIO_OUTPUT_ACTIVE will let you configure a pin as output and immediately set it to the active "logical 1" state, without having to think about whether the pin is configured as active high or active low.
I hope this clarifies things.
Best regards,
Raoul Pathak
Hi,
Thanks