Jump to content

Need help for GPIO with BananaPro Armbian Mainline


Marcelm2000

Recommended Posts

Hello,

actually i have "Bananian" with the kernel "3.4.113-bananian", and I would like to switch to the Armbian mainline kernel!

 

My problem / question is how does it work with the GPIO in the mainline kernel?

 

I use these commands under the legacy kernel... (I use the modified WiringPI from LeMaker)

echo "17" > /sys/class/gpio/export
echo "out" > /sys/class/gpio/gpio17/direction
echo "1" > /sys/class/gpio17/value

But these unfortunately no longer work under the mainline kernel!

 

I don't understand how i calculate now the right GPIO Pin. (http://linux-sunxi.org/GPIO#Accessing_the_GPIO_pins_through_sysfs_with_mainline_kernel)

 

I look forward to your help!

 

Greeting,

Marcel

Link to comment
Share on other sites

As the Linux-sunxi page you've mentioned :

Quote

(position of letter in alphabet - 1) * 32 + pin number

 

So, in your example, the pin is PA17.

If we take another pin, lets say PC12 : it would be 76.

If we take another pin, lets say PD5 : it would be 101.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines