<snip>
I've looked around the BeagleBoard web site, and Google'd, and I can't find any software reference documentation. Am I just not seeing it? Where is it hiding?
I think that is something we will pull together over time, but the
starting point is the README.htm. [1]
[1] BeagleBoard.org - Page not found
I also grep'ed around in /usr/include, but I can't find anything that looks like BeagleBone specific include files that define things like I/O pins and registers and such, although I'm sure such stuff must exist. Clues would be most welcome here.
There's currently not much BeagleBone specific include stuff built
yet. Linux provides sufficient abstractions for the peripherals with
the exception of the pinmux currently--and even that is mostly covered
by the OMAP pinmux documentation, though it is in the process of being
reworked.
<snip>
-dave
Hi Dave,
I'm afraid there isn't too much in the way of software info available right now. For some of the basic stuff take a look at this link. Although it is for the Beagleboard, it also applies to the bone.
Category:ECE497 - eLinux.org
That's a pretty good place to start. I'm open to moving some more
BealgeBone specific information from that into the BeagleBone101
presentation referenced in the README.htm, based on priorities of the
questions being asked.
Mark
I started looking around in the bonescript sources here:
https://github.com/jadonk/bonescript/blob/master/bonescript/index.js
and it has code to talk to the GPIO.
It looks like the Bone has virtual devices for setting the direction and value. Unfortunately, I'm not too swift at Javascript, so reading/understanding it will be slow going. I was able to blink an LED from the command line, though.
It seems like the Bone's GPIO interface is very different from the BeagleBoard.
It is pretty much identical. Both simply handled by the Linux GPIO abstraction.
So... I guess best bet for understanding the virtual devices would be to look at the kernel code that implements them? Anyone have a clue where that lives in the source tree?
I think the gpio.txt file in the kernel tree might be the first place
for you to start. [2] For other interfaces, I recommend looking
through the ABI documentation first. [3] I'll take a look around and
come back with the location for the GPIO kernel sources, but I doubt
that is what you really need right now.
[2] http://www.kernel.org/doc/Documentation/gpio.txt
[3] http://www.kernel.org/doc/Documentation/ABI/README
Also, the devices are only writable by root -- which makes some sense but I'd really like to have code running as a normal user be able to talk to I/O. Any thoughts on how to accomplish that?
You can change permissions on the files as one option.
In any case, if the Bone GPIO can be completely controlled by read/writes to virtual devices that is a big improvement over the Good Old Days -- and really cries out for a Python module, which I would love to start working on as soon as I can sort out how it all works.
Great! In addition to the JavaScript library I'm working up
(bonescript), there is also a C++ library and set of tools to build
Arduino sketches that Dave Anders has been working on that I'm looking
forward to him sharing with the community and enabling us to
complete/extend.