Hello. I try to init GPIO in 'legacy' approach through GPIO number request.
I have the simple code:
//BASE for GPIO2 is : 448
//GPIO2_04 is : 448+4 = 452
gnum = gpio_request(452, "pin2");
if(gnum < 0) return -1;
//Configure as output and set HIGH level
gnum = gpio_direction_output(452, 1); //doesnt work. always 0 at output
if(gnum < 0) return -2;
All functions return with OK.
But.. when I touch my oscilloscope I see low-level at the line
Command promt:
cat /sys/kernel/debug/gpio shows me also - "out lo" (I m expecting "out hi")
Alsi I tried to read GPDAT register from memory. And this also shows me zero value in output.
What is going wrong? I cannot to set 'HIGH' level for any pin from GPIO2 block.
Thanks