Personal tools

Log in

Changes

From IGEP - ISEE Wiki

Jump to: navigation, search

How to use GPIOs

204 bytes removed, 12:44, 11 January 2012
no edit summary
=== Install shared library ===
Go to:$/svn.hylands.org/linux/gpio/lib/. libgpio.so is here.
If a program is linked with 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-driver/lib/
</pre>
Check that libgpio.so is linked correctly. Go to:$/svn.hylands.org/linux/gpio/app, gpio program is here. Type next command:
</pre>
ldd command, print shared library dependencies. The result will be similar at that:
<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. ocalhostlocalhost:~/svn.hylands.org/linux/gpio-driver/app# ldd gpio libgpio.so =&gt; /root/svn.hylands.org/linux/gpio-driver/lib/libgpio.so (0x40197000)
libc.so.6 =&gt; /lib/libc.so.6 (0x401a0000)
/lib/ld-linux.so.3 (0x4008a000)
4,199
edits