Author Topic: How to control GPIO ports? Help noob please=)  (Read 4251 times)

maxi-fish

  • Guest
How to control GPIO ports? Help noob please=)
« on: March 20, 2013, 01:55:15 pm »
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

  • Guest
Re: How to control GPIO ports? Help noob please=)
« Reply #1 on: March 28, 2013, 02:25:48 pm »
Hey, can anybody explain, how to compile drivers?

Offline vinifr

  • Newbie
  • *
  • Posts: 32
  • Karma: +2/-0
    • View Profile
Re: How to control GPIO ports? Help noob please=)
« Reply #2 on: March 30, 2013, 05:54:14 pm »
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
« Last Edit: March 31, 2013, 01:43:57 pm by vinifr »