Skip to main content

2 docs tagged with "atomic"

View all tags

A GPIO Driver from Scratch

The blink program drove one pin with two #defines and it was the right amount of code for one pin. The second pin costs another two, the first alternate-function pin costs four, and by the tenth you have shift arithmetic scattered across the codebase with the pin number written out by hand in each place. The fix is not a HAL. It is about eighty lines that name what the hardware already does.

Boost.Atomic

Boost.Atomic provides atomic operations with explicit memory-ordering guarantees — the building