differences between inline functions and macro definitions
Inline functions can speed up the program when compared to normal functions because no interrupt calls are required, and inline functions are embedded directly in the target code at compile time, and the macro is simply a replacement.
Inline functions need to be checked for parameter types, which is the advantage of inline functions and macro ratios
Inline refers to the embed code, that is, where the function is called without jumping, but directly to write the code there. For short code, inline increases the amount of space consumed in exchange for increased efficiency. Inline is safer when compared to macros without paying an extra price,
Inline is generally used for the following situations:
(1) A function is repeatedly reused
(2) The function has only a few simple lines, and the function does not contain for,while,switch