Setting up the Android NDK for PacktHAL
Unfortunately, the Android Native Development Kit (NDK) is missing a kernel header file that is needed to build PacktHAL. The missing header describes the interface between user space apps and the generic SPI driver (spidev
, which you will use in Chapter 5, Interfacing with High-speed Sensors Using SPI). It is not the fault of the NDK that this header file is missing, as usually apps will never need direct access to the spidev
driver.
As you are using an app to talk directly talk to the hardware, you will need to copy this missing header into your NDK installation.
Tip
For your convenience, we have included a copy of this header file in the PacktHAL source tarball. You only need to copy the file into your NDK installation prior to building PacktHAL.
BBBAndroid is 4.4.4 KitKat, and API level 19 is the highest level supported by this version. You will be building all of the examples in this book for API level 19. Each API level has a different set of headers...