O'Reilly logo

Embedded C Programming by Mark Siegesmund

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7

Functions

Abstract

This chapter uses the previously learned C statements and expressions to explain how to properly make C functions. The main() function and user-defined functions are covered.

Much of this chapter deals with the various methods to pass data into a function, including pass by value, reference parameters, and default parameters. Function return values, the use of functions in expressions, and dealing with passing back complex types are all explained.

This chapter also covers the advanced topic of function overloading. Recursion is briefly introduced as an ineffective concept for use on PIC® microcontrollers.

Programming methodologies such as object-oriented and top-down are introduced.

Examples and exercises are ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required