On 1/29/2014 7:09 AM, Charles Steinkuehler wrote:
> 
> GPIO is controlled in the usual way via /sys/class/gpio, which currently
> requires you know the kernel gpio number of the BeagleBone pin you want
> to manipulate.  I hope to code up an application to make this easier,
> but it may take some time.

I have the first version of a helper application available in the github
repository.  Run the config-cape-universal script as root or via sudo to
control pin multiplexing and GPIO direction.

Usage:

> config-cape-universal <pin> <mode>
>     Set <pin> to <mode>, configuring pin multiplexing and optionally
>     configuring the gpio.  Valid <mode> strings vary based on <pin>,
>     however all pins have a default and gpio mode.  To setup gpio
>     the following <mode> strings are all valid:
>         gpio :
>             Set pinmux to gpio, gpio direction and value unchanged
>         in | input:
>             Set pinmux to gpio and set gpio direction to input
>         out | output :
>             Set pinmux to gpio and set gpio direction to output
>         high | 1 :
>             Set pinmux to gpio and set gpio direction to output driving high
>         low | 0 :
>             Set pinmux to gpio and set gpio direction to output driving low
> config-cape-universal -l <pin>
>     list valid <mode> values for <pin>
> config-cape-universal -q <pin>
>     query pin and report configuration details
> config-cape-universal -f <file>
>     Read list of pin configurations from <file>, one per line
>     Comments and white-space are allowed

<pin> is supposed to be something like P8_09, but the code is lax on
what it accepts, so p8x09, p809, 809, and 89 all mean the same thing.

<mode> is more particular at the moment, and is currently case sensitive.

Please test and report back any problems.  Also, if you have an
suggestions for improved operation or syntax, please let me know.  At
this point, nothing is carved in stone, and I'd rather change things to
get it right than live with what seemed like a good idea to me at the
time!  :)

-- 
Charles Steinkuehler
[email protected]

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to