Interpretation of Google C++ Style Guide Series Part 1 (Header Files)

This series of articles is an interpretation of the original text, adding some personal insights and supplementing actual code examples to aid understanding – Original text link C++ Version The target version of this Google C++ style guide is C++20, so it will not cover features of C++23. Header Files Typically, each <span>.cc</span> file should … Read more

C++ Programming Guidelines – Functions

C++ Programming Guidelines - Functions

01 .1 Inline Functions Inline functions (inline function) should be less than 10 lines Description: Inline functions have the characteristics of regular functions, but differ in how function calls are handled. When a regular function is called, control is transferred to the called function and then returns to the calling function; whereas, in an inline … Read more

Categorizing Functions in Embedded C Code

Categorizing Functions in Embedded C Code

Content Hello everyone, I am Bug Jun~For C developers, functions are definitely not unfamiliar, and you could even type them out with your eyes closed. But have you categorized the functions in C language? When you write a function, do you first think about its functionality or its parameters?Today, I suggest categorizing the functions you … Read more

Differences Between C and C++

Differences Between C and C++

Although C and C++ are often mentioned together, they are certainly not the same thing.The C language we commonly use today is based on the C89 standard, while C++ is based on the C++99 standard.C89 was established in 1989, and the latest standards are C11 and C++11.Depending on the different standards, their functionalities also vary, … Read more

What Are the Differences Between Inline Functions and Macros in Embedded Development? How to Apply Them?

What Are the Differences Between Inline Functions and Macros in Embedded Development? How to Apply Them?

Follow + Star “Embedded Development Notes”, so you won’t miss out on exciting content! Friends who often write code should have encountered inline functions and macro definitions. These two types of writing are frequently seen in many codes, especially in large codebases where strictness and standardization are required, allowing one to learn many clever techniques … Read more

Differences Between C and C++

Differences Between C and C++

Although C and C++ are often mentioned together, they are certainly not the same thing.The C language we commonly use today is based on the C89 standard, while C++ is based on the C++99 standard.C89 was established in 1989, and the latest standards are C11 and C++11.Depending on the different standards, their functionalities also vary, … Read more

C Language ‘Fast Charging’ Techniques: Inline Functions

C Language 'Fast Charging' Techniques: Inline Functions

Scan to follow Chip Dynamics , say goodbye to “chip” congestion! Search WeChatChip Dynamics Hello everyone! Today we will talk about a small technique in C language that is both efficient and easy to “misfire”—the Inline Function! Have you ever encountered a situation where you wrote a super simple function, but the overhead of calling … Read more

The Ultimate Showdown of C Language’s Three Musketeers: Regular Functions, Inline Functions, and Function-like Macros

The Ultimate Showdown of C Language's Three Musketeers: Regular Functions, Inline Functions, and Function-like Macros

Scan the code to follow Chip Dynamics and say goodbye to “chip” congestion! Search WeChatChip Dynamics Dear C language warriors, have you ever faced the dilemma of choosing between regular functions, inline functions, and macros when you need to encapsulate a piece of code? Today, we will thoroughly resolve this issue! Inline FunctionsAdvantages of Inline … Read more

Essential Guide to C++ Basics: Detailed Explanation of Functions, Inline Functions, and Lambda Functions

Essential Guide to C++ Basics: Detailed Explanation of Functions, Inline Functions, and Lambda Functions

Introduction In the journey of C++ programming, functions are the fundamental building blocks for constructing complex programs. They are like Lego blocks, allowing us to break down code into smaller, more manageable parts. Today, we will delve into three important types of functions in C++: regular functions, inline functions, and lambda functions. Mastering these will … Read more

Why STM32 LL is More Efficient than HAL?

Why STM32 LL is More Efficient than HAL?

Follow+Star Public Account, don’t miss out on exciting content Author | strongerHuang WeChat Public Account | Embedded Column The standard peripheral library, HAL, and LL software library of STM32 all have many clever aspects worth learning from.Today, we will discuss how the STM32Cube LL library cleverly uses “static inline” to make the code more efficient. … Read more