Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Android Hardware Interfacing with the BeagleBone Black

You're reading from   Android Hardware Interfacing with the BeagleBone Black Design and implement Android apps that interface with your own custom hardware circuits and the BeagleBone Black

Arrow left icon
Product type Paperback
Published in Feb 2015
Publisher
ISBN-13 9781784392161
Length 134 pages
Edition 1st Edition
Languages
Arrow right icon
Toc

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 $19.99/month. Cancel anytime
Banner background image