November 19, 2019, 05:36:15 am

News:

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


Cubieboard2 and c or c++

Started by 5282, November 07, 2013, 11:26:46 pm

Previous topic - Next topic

5282

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

patwood

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

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

patwood

All of my gpio experience on a10 and a20 is with linux. I believe some people have gotten gpio to work on android.

5282

Quote from: patwood 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.

thank you  ;D
what is name of linux  or verison?

patwood

Quote from: 5282 on November 09, 2013, 05:39:07 pm
Quote from: patwood 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.

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