Discovering, installing and using drivers is the topic of early chapters of this book. Having seen how to work with drivers we move on to direct access to the hardware via the Gpio5 library, which is developed and enhanced throughout the book.
Next comes a lightning tour of the electronics needed for simple IoT applications. This is followed by a digression into the Device Tree and overlays, using the DHT22 temperature and humidity sensor as a practical example, before tackling PWM both via a driver and directly using Gpio5. The same treatment is applied to the two standard buses, I2C and SPI and also the 1-wire bus. We then look at two attempts to impose a higher organization, the hardware monitoring system, hwmon, and Industrial I/O, IIO.
We next come to the PIO, the Programmable Input Output, first introduced by the Raspberry Pi Pico, a unique way to interface the CM5 to the outside world without the need to use the CPU. After covering the basics, we look at three examples of the most sophisticated PIO programs you are likely to encounter.
The penultimate chapter takes drivers to the next level, showing you how to create your own custom overlays by writing fragments of the device tree, and the final chapter is about advanced scheduling and dealing with problems encountered in running a real-time system.
Harry Fairhead has worked with microprocessors and electronics for many years and is an enthusiastic proponent of the IoT. C is his programming language of choice and he is the author of Fundamental C: Getting Closer To The Machine and Applying C For The IoT With Linux. His Raspberry Pi books include Raspberry Pi 5 IoT In C: Drivers and Gpio5, the companion volume to this book, Raspberry Pi IoT In C, 3rd Ed; Raspberry Pi IoT in C With Linux Drivers, 2nd Ed and Programming the Raspberry Pi Pico/W in C, 2nd Ed.