December 05, 2019, 10:59:16 am

News:

Have you visited the Allwinner Chipset wiki? - http://linux-sunxi.org/


How to control GPIO ports? Help noob please=)

Started by maxi-fish, March 20, 2013, 01:55:15 pm

Previous topic - Next topic

maxi-fish

Hello.
Can anybody make guide, how to use GPIO and how to make kernel for it(download it, may be)
I read some topics, but I didn't understand most information in them. For example, how to compile kernel, what is FEX?
I read this topic(http://cn.cubieboard.org/forum.php?mod=viewthread&tid=122) but didn't understand whst means "compile the sun4i-gpio.ko driver that match the version of your kernel".

Will anyone help me or I'm so silly, that nobody will explain it? =)

maxi-fish

Hey, can anybody explain, how to compile drivers?

vinifr

March 30, 2013, 05:54:14 pm #2 Last Edit: March 31, 2013, 01:43:57 pm by vinifr
Hi, here are some instructions: http://linux-sunxi.org/Linux
http://www.cubieforums.com/index.php/topic,23.0.html

Do you want to use GPIO in userspace or kernelspace?
To kernel there is a newer driver: https://github.com/linux-sunxi/linux-sunxi/blob/sunxi-3.0/drivers/gpio/gpio-sunxi.c

To userspace you could use: https://github.com/vinifr/drivers-sunxi/tree/master/gpio_lib

Note: in main.c setting the pins for your board