GPIO in C

Started by morind79, October 12, 2013, 04:20:21 PM

Previous topic - Next topic

morind79

Hi,

I would like to make a library to control A20 board GPIO on Debian (Like wiringPi).
Do you have an example of C program to control GPIO ?

Thank you

Best regards
Denis

XFer

That would be Absolutely Great!!  :D :D :D :D :D :D :D :D :D :D

Unfortunately I don't know of a C example which actually works for A20 GPIOs.

You may have a look at the GPIO kernel driver:

https://github.com/linux-sunxi/linux-sunxi/blob/stage/sunxi-3.4/drivers/gpio/gpio-sunxi.c

and at this thread (it's about Cubieboard, but it uses an Allwinner too):

http://www.cubieforums.com/index.php/topic,253.30.html

Fernando

Mouchon

Hi,

The https://pypi.python.org/pypi/pyA20/0.1.6 python contain c library to access gpio in user space
you can use it for your own usage. This is what i did.

Kr

Philippe