
Make your Code Safe and Readable with Flags
Posted on 2018-05-06— C++, Improve your Code
I show how a small C++ flags template makes embedded register bitmasks safer and much easier to read. I'll explain why macros and CMSIS-style definitions lead to errors, and walk through clear C++11 examples and a simple driver. Read on to see the implementation and usage.