Abstract
Microcontroller applications usually require low-level drivers for peripheral devices such as I/O ports, interrupts, timers, communication interfaces like UART, CAN [2], SPITM, etc. This chapter presents several efficient methods for programming peripheral hardware drivers in C++. Low-level drivers are inherently dependent on the microcontroller and its peripherals. Even though the low-level hardware drivers in this chapter are primarily designed for our target with the 8–bit microcontroller, an effort has been made to keep them as portable as possible. In this way, they can be adapted to other microcontrollers.
Notes
- 1.
- 2.
Note, however, that disabling the interrupts for too long or forgetting to re-enable them in a timely fashion may lead to a system crash with unpredictable results.
References
Free Software Foundation, The GNU Compiler Collection Version 4.6.2 (2012), http://gcc.gnu.org
ISO, ISO 11898–1:2003: Road Vehicles – Controller Area Network (CAN) – Part 1: Data Link Layer and Physical Signaling (International Organization for Standardization, Geneva, 2003)
ISO/IEC, ISO/IEC 9899:1999: Programming Languages – C (International Organization for Standardization, Geneva, 1999)
ISO/IEC, ISO/IEC 14882:2011: Information Technology – Programming Languages – C++ (International Organization for Standardization, Geneva, 2011)
W. van Hagen, The Definitive Guide to GCC (Apress, Berkeley, 2006)
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2013 Springer-Verlag Berlin Heidelberg
About this chapter
Cite this chapter
Kormanyos, C. (2013). Low-Level Hardware Drivers in C++. In: Real-Time C++. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-34688-0_9
Download citation
DOI: https://doi.org/10.1007/978-3-642-34688-0_9
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-34687-3
Online ISBN: 978-3-642-34688-0
eBook Packages: Computer ScienceComputer Science (R0)