[beagleboard] Re: GPIO in C/C++ on the Beaglebone Black?

2016-06-12 Thread Raul Piper
I modified the app a bit and tried running this code on the BBB under sudo mode : gpio_export(gpio); // gpio_set_dir(gpio, 0); gpio_set_dir(gpio, 1); gpio_set_edge(gpio, "rising"); gpio_fd = gpio_fd_open(gpio); printf("debug_1 \n"); gpio_set_

[beagleboard] Re: GPIO in C/C++ on the Beaglebone Black?

2016-06-12 Thread Raul Piper
CEB, On which platform you tested this?Did you get any issue?Set/Reset of any GPIO works fine on any kernel?4.x+? Rp On Friday, June 14, 2013 at 2:01:51 AM UTC+5:30, CEB wrote: > > Take a look at > https://developer.ridgerun.com/wiki/index.php/Gpio-int-test.c > > Worked for me. > > CEB > > On W

Re: [beagleboard] Re: GPIO in C/C++ on the Beaglebone Black?

2015-02-04 Thread Jacek Radzikowski
As /dev/mem gives you uncontrolled access to the entire memory, you need administrative rights to open the device. If you are concerned about security, it should possible to drop privileges after opening the device; However, the program has to be started as root, either from root account, or as sui

Re: [beagleboard] Re: GPIO in C/C++ on the Beaglebone Black?

2015-02-04 Thread Julian Gold
This - like several solutions - tries to open /dev/mem for read and write. On my Rev C debian BBB, this operation fails, I suspect due to access rights as it seems like it may need root access privilege? (Similarly for the sysfs method, you can't write to sys/class/gpio/export unless you're roo