In this section, you will examine the example Android app that performs the SPI bus interfacing on BBB. The purpose of this application is to demonstrate how to use PacktHAL to perform SPI reads and writes from within an actual app using a set of interfacing functions. These functions allow you to send and receive data between the SPI bus master (the BBB) and the SPI bus slave (the SPI sensor). The low-level details of the hardware interfacing are implemented in PacktHAL, so you can quickly and easily get your apps interacting with the sensor.
Before digging through the SPI app's code, you must install the code to your development system and install the app to your Android system. The source code for the app and the precompiled .apk
packages are located in the chapter5.tgz
file, which is available for download from Packt's website. Follow the same process to download and add the app to your Eclipse ADT environment that was described in Chapter 3, Handling...