I am facing stupid problem. LED is on when pin is low. I need to get the pin as output with level high (LED physically turned off).
- If I export and set direction to out, LED gets on, and
value
is read as 0. - If I export, write 1 to
active_low
, and then set direction to out, LED gets on, andvalue
is read as 1.
But I can’t write value until I set direction to output. Any ideas?
I have control over the device tree, therefore the suggestion to pre-configure the behavior of the unused gpio pin will be very welcome.