© Warren Gay 2018
Warren GayAdvanced Raspberry Pihttps://doi.org/10.1007/978-1-4842-3948-3_13

13. C Program GPIO

Warren Gay1 
(1)
St. Catharine’s, Ontario, Canada
 

Whether your application needs fast access or specialized access from GPIO, a C/C++ program is the most convenient way to go. Python programs likewise can have direct access with the help of a module.

This chapter looks at how to access the GPIO ports directly from within a program, starting with the unfinished business of using the uevent file, to detect input GPIO changes with the help of interrupts behind the scenes.

Edge Events

The previous chapter introduced the uevents pseudo file that the GPIO driver provides. There it was explained that you needed to use one of the system calls poll(2) ...

Get Advanced Raspberry Pi: Raspbian Linux and GPIO Integration now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.