Skip to Content
Embedded C Programming
book

Embedded C Programming

by Mark Siegesmund
September 2014
Beginner to intermediate
424 pages
10h 4m
English
Newnes
Content preview from Embedded C Programming
Chapter 3

Preprocessor Directives

Abstract

This chapter explains how C programs are processed in two distinct steps. The preprocessor stage and the preprocessor directives are the focus of this chapter.

The ANSI required directives are each explained with examples of their use. This includes the very popular define used for textual replacements to improve both program readability and maintainability.

In addition this chapter covers compiler-specific directives required for programming embedded microcontrollers. Examples show setting processor configuration bits, oscillator types, and speed as well as accessing processor registers. Conditional compilation and macros are introduced; however, they are covered in detail on other chapters.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Practical C Programming

Practical C Programming

B. M. Harwani

Publisher Resources

ISBN: 9780128013144