Jump to content

Recommended Posts

Posted

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

Posted

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.

Posted

Hi Marcelm,  try your calculation again ..  I think you may find it works out to 275.

 

I hope this sorts the problem for you.

 

8 x 32 plus 19

Posted

Hi Marcelm, glad to be of help.

 

I found sorting GPIO pins / inputs / outputs quite a challenge to start with as Odroid, Pine and Raspi etc all had / have different values.

 

All very confusing ....

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

Important Information

Terms of Use - Privacy Policy - Guidelines