1. Naming specification
To make variables better understood by other developers who read the code, you need to use a prefix
A (array), B (Boolean), I (4-byte integer), u (unsigned integer number), p (pointer), S (String), SZ (null-terminated string)
-For example:
BOOL Bflag;
int iCount;
Char Szname[name_len];
i,j,k,m,n,x,y,z single-letter variables are used at loop control and indexing, non-abusive • Local static variables must be prefixed with s_, such as S_bflag, on the basis of other rules. • Global variables must be prefixed with g_, such as: G_bflag If a variable is both a global variable and a static variable, it is necessary to use g_ because the global type is more important than the static type • If it is a struct variable, you can use Stru_ or st_, Depending on the situation, you cannot make the code look too long, but it is not easy to read
Code for embedded software programming