[Gambas-user] Shared bcm2835 library for RasPi
Christer Johansson
lists at ...2828...
Wed Feb 6 22:07:12 CET 2013
First of all thanks to Mike McCauley for making and sharing the bcm2835
library, _ALL_ credits belongs to him and not me, I just compiled a shared
lib version so we can use Mike's great work to access GPIO, SPI ports etc.
on the Raspberry Pi to toggle LED's or interface with other hardware!
Since I know here are a bunch of other Raspberry Pi owners on this
list I just wanted to share the lib with you since it took me a while
and some pure luck ;) to figure out how to compile it in GCC...
So far I've only used a few of all available functions to control some LED's
so if anyone else figure out correct declaration with Gambas3 EXTERN command
please share with the list and I will compile it into a readme.txt for
upcoming
version.
Visit Mike's website for more information on parameters etc.
http://www.open.com.au/mikem/bcm2835/index.html
Installation
------------
1. Copy "libbcm2835.so" to /usr/local/lib directory and run the
following command to install
ldconfig
2. Verify with following command that lists all shared libraries.
ldconfig -v
3. Declare the functions in Gambas 3 with EXTERN command...
Public EXTERN bcm2835_init() As Integer In "libbcm2835"
etc...
NOTE: You must run your Gambas3 program as root else it won't work! Maybe
there
are ways to fix this?
Again, kudos to Mike McCauley!
/CJ
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bcm2835-1.17_shared_lib.tar.gz
Type: application/x-gzip
Size: 8964 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20130206/04d92256/attachment.bin>
More information about the User
mailing list