1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <?xml-stylesheet type="text/xsl" href="helma.xsl"?>
3 <xmlroot xmlns:hop="http://www.helma.org/docs/guide/features/database">
4 <hopobject id="2127" name="Bonelib" prototype="Page" created="1349110534079" lastModified="1395757083283">
5 <hop:parent idref="20" prototyperef="Page"/>
6 <is_xhtml type="boolean">true</is_xhtml>
7 <http_remotehost>127.0.0.1</http_remotehost>
8 <pname>C++ and PERL Hardware Abstraction Library</pname>
9 <registrant>janick-bergeron.myopenid.com</registrant>
10 <http_language>en-US,en;q=0.8</http_language>
12 <http_browser>Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.79 Safari/537.4</http_browser>
13 <time type="date">03.10.2012 10:01:43 CDT</time>
14 <updatetime type="date">01.10.2012 11:55:34 CDT</updatetime>
15 <hopsession>127.0.0.198.182.56.a8rz94jxxaah</hopsession>
16 <body>For example, to use pin P8[3] as an input with a pull-down, you normally have to:
19 <li>Look up the BeagleBone System Reference Manual and determine that pin 3 on connector P8 corresponds to GPIO1[6]
20 <li>Set the pin muxing to mode 7 + input + pull-down by writing 007 to /sys/kernel/debug/omap_mux/gpmac_ad6
21 <li>Export the GPIO system files by writing 38 to /sys/class/gpio (btw, "38" does not come from P8[3], but from 1*32+6).
22 <li>Set the GPIO to input by writing "in" to /sys/class/gpio/gpio38/direction
23 <li>Sample the input by reading /sys/class/gpio/gpio38/value
26 Still with me? Bonelib makes it as simple as:
28 <pre>BeagleBone::gpio* inp = BeagleBone::gpio::P8(3);
29 inp->configure(BeagleBone::pin::IN, BeagleBone::pin::PD);
31 unsigned char val = inp->get();</pre>
35 Find the full user documentation at http://sourceforge.net/p/bonelib/wiki/Home/</body>
36 <pseudoparent idref="20" prototyperef="Page"/>
38 <pvcount type="float">9.0</pvcount>
39 <homepage>https://sourceforge.net/projects/bonelib/</homepage>
40 <render_skin>project</render_skin>
41 <edit_skin>edit_project</edit_skin>
42 <http_referer>http://beagleboard.org/project/Bonelib/edit</http_referer>
43 <http_host>beagleboard.org</http_host>
45 <shortdesc>Library of C++/PERL objects providing a high-level abstraction of the BeagleBone peripherals</shortdesc>
46 <user>janick-bergeron.myopenid.com</user>