APPENDIX B

image

Class GPIO 2

The library class GPIO provides a very simple API to work with the Raspberry Pi GPIO hardware in a C++ program. Using this library class, you can immediately work to define your application rather than rewrite or adapt code.

This appendix is useful for those wanting to:

  • Start or stop the General Purpose Clock

  • Configure a PWM clock

  • Configure and start the PWM peripheral

For include file and linking instructions, see Appendix A.

Class Definition (Part 2)

In this second part of our look at the GPIO class, I’ll discuss the methods applicable to starting the General Purpose Clock and the PWM peripheral.

In the following, I’ve ...

Get Exploring the Raspberry Pi 2 with C++ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.