Try Embedded

5.3 Designing firmware

Layering drivers so they are portable and testable, and the error-handling, encapsulation and table-driven patterns that recur in every codebase.

Lessons

Project: Smart thermostat

A thermostat that runs for years without a reboot: drivers that can be tested without a board, modules that do not depend on each other, a main loop that never blocks, and a safe answer when the sensor fails.

Before this module