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 9

Structures

Abstract:

This chapter deals with C structures and unions. Some other languages call these records. Structure definitions are covered along with the use of tags and typedefs. The advanced topics of nested structures and bit fields are fully explained with examples. The differences between unions and structures are taught in this chapter.

The layout of structures and unions in memory is shown, as well as the use of the packed attribute. This chapter has many examples to show how structures can be best used in embedded programs for microcontrollers.

Examples and exercises are for the popular PIC™ microcontroller manufactured by Microchip.

Keywords:

Structure

Struct

Union

Member

Field

Bit field

Tag

Attribute

Packed

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