On 06/27/14 06:58, patrick keshishian wrote:
Hello,

I'm trying to play with the GPIO on bbb. I must be
misunderstanding how this is supposed to (expected)
to work.

I've been looking through the gpioctl (gpio) manuals,
but i'm still confused, and could use a pointer.

here is a demo:

# gpioctl gpio1 7
pin 7: state 1

# gpioctl gpio1 7 off
pin 7: state 1 -> 0

# gpioctl gpio1 7
pin 7: state 1

hmm...

# gpioctl gpio1 7 off
pin 7: state 0 -> 0

err... help?

Hi,

The direction of the pin has to be configured at securelevel 0.
You can put something like the following line in /etc/rc.securelevel:
gpioctl gpio1 23 set out

Then you should be able to toggle the pin:
# gpioctl gpio1 23 on
pin 23: state 0 -> 1
# gpioctl gpio1 23 off
pin 23: state 1 -> 0



--patrick

# sysctl kern.version
kern.version=OpenBSD 5.5-current (GENERIC-OMAP) #3: Mon Jun 16 21:01:38 EDT 2014
     r...@pandaes.in.nickh.org:/usr/src/sys/arch/armv7/compile/GENERIC-OMAP

Reply via email to