Firmware · Program structure and state machines

Layers you can test

Firmware that talks to registers everywhere is hard to test or move to another chip, and a layered structure avoids that.