SPI in C/C++ and SPIDev-usage

When i search for documentation on SPI-communication in C/C++ for BeagleBone Black, i get a lot of different solutions to the issue.
Im looking for an up-to-date solution for connecting my Sparkfun LSM9DS1 Breakout to the BBB’s SPI pins:


I’ve managed to setup pins through universal-io commands from terminal, and sent a few registers using python and Adafruit BBIO.
I’m new to object-oriented programming, but want to know where the core locations of the SPI bus sits, and the configurations neccessary to configure pins like universal-io does.
Another idea is to redirect the Sparkfun-library to BBB’s SPI pins, but i do not know where to find these

I have a decent understanding of the debian file structure, but i do not know where libraries and SPI pin configurations are located

Does anyone have a clue which could lead me in the right direction? All help is appreciated!


I think they are located as spidev or maybe not. Let me take a quick glance of my file system. Please hold.


This shows some available spi devices.


Thanks for the respons. I managed to find a SPI-Library communicating via the SPIDev buses at DeeplyEmbeddeds websites, which Ill integrate i to the Breakout’s Arduino library. Ill post IT here once complete!


If you need the names of some books that incorporate some Linux Distros on SoC or SiP (BeagleBone stuff) and arduino, let me know. I have some books to mention.


P.S. They are mostly dedicated to the Pi thing but you can transfer the info. and ideas to the BBB family of computing. I always try to update the books from the past for fun. I update their usage w/ current configurations of the BBB family and Debian. Staying busy is half the battle. Good luck w/ your project. I will wait to see it live in action. Oh and there is a library for SPI from Adafruit, too. See here: https://learn.adafruit.com/setting-up-io-python-library-on-beaglebone-black/spi and https://github.com/adafruit/adafruit-beaglebone-io-python. The second link for github.com has SPI stuff for the BBB is further down on that page.

Oh and I Almost Forgot,

Hello Again…if you look up adafruit spi beaglebone black on google, there should be some nice adventurous stuff on the page.