Jump to ratings and reviews
Rate this book

Embedded C Programming Design Patterns: Essential design patterns for clean, maintainable and robust firmware development.

Rate this book
Why you need design patterns

Clean and maintainable: design patterns help us write clean, robust and maintainable code.

Enhanced code reuse: patterns help you decouple dependencies and keep your code organized.

Being proactive about bug prevention: design patterns give clear expectations and enable us to review and reason about large quantities of code more easily.

Removes ambiguity: using the same patterns consistently removes ambiguity about code structure and behavior.

Essential for effective DevOps: code that applies well known and understandable patterns is easy to review.

Make details fall into place: design patterns help organize the code and make small implementation details fall into place more easily.

Creational Patterns

Object Pattern: Group data into objects with classes and member functions for instantiation and destruction.

Opaque Pattern: Keep implementation private and expose only a handle to the object with three different methods.

Singleton Pattern: Ensure a class has only one instance and provide global access to it.

Factory Pattern: Provide an interface for creating objects in a super class, allowing sub-classes to alter the type of objects that will be created.

Structural Patterns

Callback Pattern: Handles object-oriented callbacks bound to object instances, allowing callbacks to operate on specific instances.

Inheritance Pattern: Used for implementing inheritance relationships between objects and components in a C program to create a hierarchy of objects.

Virtual API Pattern: Implements virtual functions in C and makes handles to opaque objects "smart," providing polymorphism and allowing the same interface for several implementations.

Bridge Pattern: Builds upon the virtual API pattern to bridge two distinct hierarchies of objects, illustrated in Rust and C examples.

Behavioral Patterns

Return Value Pattern: Standardizes function handle return values for clear communication with caller.

Concurrency Patterns

Concurrency Introduction: Concurrency as a pattern for software development and when to consider it as a valuable tool.

Spinlock Pattern: Protects shared data from corruption by ensuring interrupt never runs when modifying it.

Semaphore Pattern: Outlines a pattern of signaling between interrupt handlers and application level threads for thread-aware synchronization.

Mutex Pattern: Prevents starvation by means of priority inheritance and is used for mutually exclusive access to a resource.

332 pages, Kindle Edition

Published February 23, 2023

8 people are currently reading
2 people want to read

About the author

Martin Schröder

53 books4 followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
0 (0%)
4 stars
0 (0%)
3 stars
0 (0%)
2 stars
0 (0%)
1 star
0 (0%)
No one has reviewed this book yet.

Can't find what you're looking for?

Get help and learn more about the design.