Embedded C
Home
1.
Comments
Block comment
Single line comment
Nesting comments
2.
Variables, identifiers, and data types
Variables
Identifiers
Datatypes
Declaring variables
3.
Constants and literals
Constants
Literals
4.
The printf() C library function
How to use printf()
Conversion characters
5.
Operators
Arithmetic operators
Assignment operators
Relational operators
Logical operators
Bitwise operators
Shift operators
Memory addressing/member access
Other operators
Operator precedence
6.
Expressions and statements
Expression statements
Compound or block statements
Control statements
7.
Decision making
Boolean expressions
if statement
switch statement
8.
Loops
For loop
While loop
do while loop
break statement
continue statement
9.
Functions
Introduction
Return data type
Parameters
How to call a function
Function prototypes
Passing parameters by value
Functions and scope
10.
Storage classes
Introduction
Auto variables
Static variables
Extern variables
Register variables
Scope of functions
11.
Arrays
Introduction
Multidimensional arrays
Strings
12.
Pointers
Pointer declaration
Pointers and arrays
Pointers and functions
Pointers and strings
Arrays of pointers
13.
Function pointers
Introduction
Calling a function via a function pointer
Passing a function to a function
14.
Structures
Structure definition
Variable declaration
Using structure variables
Structure types
Initialization of structure variables
Nested structures
Pointers to structures
Creating arrays of structures
Initializing arrays of structures at declaration
Using arrays of structures
Passing structures to functions
15.
Bitfields
Using bit fields
16.
Peripheral access using CMSIS
Accessing peripherals
Reading, modifying, and writing bit fields in registers
Alternative mechanism
17.
Unions
Introduction
Creating unions with typedefs
Unions in memory
Unions vs. structures
18.
Enumerations
Enumeration declaration
Declaration of enumeration type variable
Tagless enumeration variable
Declare an enumeration type with `typedef`
Using an enumeration type variable
19.
Macros
Simple macros
Argument macros
20.
Links
Built with
from
Grav
and
Hugo
> Links
Chapter 20
Links
This chapter provides links for further reading.