Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Android Hardware Interfacing with the BeagleBone Black

You're reading from  Android Hardware Interfacing with the BeagleBone Black

Product type Book
Published in Feb 2015
Publisher
ISBN-13 9781784392161
Pages 134 pages
Edition 1st Edition
Languages

Representing SPI devices in the Linux kernel


The Linux kernel provides a general-purpose SPI driver named spidev. The spidev driver is a simple interface that abstracts many of the housekeeping details involved in SPI communications. The spidev driver is exposed via the /dev filesystem as the /dev/spidevX.Y file. Multiple versions of these spidev files can be present depending upon the number of SPI buses configured in the Device Tree. The X value in the spidev filename refers to the SPI controller number (1 for SPI0 and 2 for SPI1), and the Y value refers to the SPI bus of that controller (0 for the first bus and 1 for the second bus). For the examples in this book, you will only be using the first SPI bus of the SPI0 controller, so /dev/spidev1.0 is the only file with which PacktHAL will interact.

Preparing Android for SPI sensor use

In Chapter 2, Interfacing with Android, you used adb to push two prebuilt files to your Android system. These two files, BB-PACKTPUB-00A0.dtbo and init.{ro...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}