Personal tools

Log in

Changes

From IGEP - ISEE Wiki

Jump to: navigation, search

How to use GPIOs

26 bytes added, 16:30, 9 January 2012
no edit summary
The module is loaded until system halt.
=== Install dynamic shared library ===
Go to:$/svn.hylands.org/linux/gpio/lib/. libgpio.so is here.
If a program is linked with dynamic shared libraries, Kernel seek in specific paths when program is executed. Now is necessary link the libgpio.so path to the environment variable LD_LIBRARY_PATH, use the following command:<br>
<pre>export LD_LIBRARY_PATH=/root/svn.hylands.org/linux/gpio/lib/
</pre>
<pre>ldd gpio
</pre>
ldd command list program , print shared library dependencies and show its paths. The result will be similar than at this:
<pre>root@lSee if libgpio.so is found it. If you execute program in bash without linking library dependencies, bash give you a error message. ocalhost:~/svn.hylands.org/linux/gpio/app# ldd gpio
libgpio.so =&gt; /root/svn.hylands.org/linux/gpio/lib/libgpio.so (0x40197000)
/lib/ld-linux.so.3 (0x4008a000)
</pre>
The shared is linked until system halt. Now you can execute example program gpio.
= Testing driver =
4,199
edits