Author Topic: Cubieboard2 and c or c++  (Read 4385 times)

5282

  • Guest
Cubieboard2 and c or c++
« on: November 07, 2013, 11:26:46 pm »
how to accessing hardware by using c or c++ to use it  ( gpio and other pin  hardware resources )
« Last Edit: November 08, 2013, 12:00:00 am by 5282 »

Offline patwood

  • Linux geek
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1660
  • Karma: +129/-0
    • View Profile
Re: Cubieboard2 and c or c++
« Reply #1 on: November 08, 2013, 10:21:56 am »
Try searching for gpio in the search bar in the upper right corner.

gpio pins are accessed via files in the /sys file system.  See also this https://www.kernel.org/doc/Documentation/gpio.txt

5282

  • Guest
Re: Cubieboard2 and c or c++
« Reply #2 on: November 08, 2013, 02:18:41 pm »
thank you
i'm new with embedded os programming
1- if i make executable file for gpio test  Cubieboard2   what is os will run this   executable file android or Lubuntu .
2

Offline patwood

  • Linux geek
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1660
  • Karma: +129/-0
    • View Profile
Re: Cubieboard2 and c or c++
« Reply #3 on: November 09, 2013, 10:10:19 am »
All of my gpio experience on a10 and a20 is with linux. I believe some people have gotten gpio to work on android.

5282

  • Guest
Re: Cubieboard2 and c or c++
« Reply #4 on: November 09, 2013, 05:39:07 pm »
All of my gpio experience on a10 and a20 is with linux. I believe some people have gotten gpio to work on android.
thank you  ;D
what is name of linux  or verison?

Offline patwood

  • Linux geek
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1660
  • Karma: +129/-0
    • View Profile
Re: Cubieboard2 and c or c++
« Reply #5 on: November 10, 2013, 12:46:33 pm »
All of my gpio experience on a10 and a20 is with linux. I believe some people have gotten gpio to work on android.
thank you  ;D
what is name of linux  or verison?

Most based on the 3.4 kernels do.  Cubian, cubeez, and cubiuntu, all available on this site, support the standard Linux gpio sysfs files; they all have x windows guis.  The linaro 13.04 is shell CLI only.  I haven't tried it, but I expect the lubuntu nand distro also supports gpio.

Look at the distros described in the a20 images forum: http://www.cubieforums.com/index.php/board,19.0.html