Tagged articles
1 articles
Page 1 of 1
Liangxu Linux
Liangxu Linux
Sep 10, 2022 · Fundamentals

Master C Preprocessor Tricks, Static/Const/Volatile Keywords, and Common Embedded Pitfalls

This article walks through essential C concepts for embedded development, including macro definitions for constants and MIN, the use of #error, infinite loops, variable declaration patterns, the roles of static, const, and volatile, bit‑mask operations, absolute address access, ISR constraints, unsigned‑int quirks, safe typedef usage, and tricky expressions like a+++b.

C programmingConst keywordMacros
0 likes · 19 min read
Master C Preprocessor Tricks, Static/Const/Volatile Keywords, and Common Embedded Pitfalls