»
(008)CubeIDE实现USB外设*
(018)C99 的指针*
(019)C99 只有值赋值,没有move*
(022)POSIX线程库pthread的同步锁*
(023)POSIX线程库pthread的多线程*
(027)C99标准库中的计时与等待 *
(028)C语言中的高精度计算库GMP *
(029)C语言中的Web服务*
(030)C语言中的字符转码ICU*
(031)从几个方面显然C语言比C++效率高*
🕹️(001)编码规范
Max Name Length: 31
STM32 C Variable Naming Regulations
*v*: void
*c*: int8_t
*w*: int16_t
*i*: int32_t
*l*: int64_t
*f*: float32
*d*: double float, float64
*u*: unsigned
p*: pointer
*s*: structure
Example:
long double *pdTemperature=(long double *)malloc(sizeof(long double));//double float pointer for temperature
Struct Definition Naming Regulations
Struct*
C++ Class Definition Naming Regulations
Class*
C++ Class Variable Naming Regulations
*cls*
【维也纳工业大学(TU Wien)的编码规范(2012年)】
C++ String Variable Naming Regulations
*str*
【匈牙利命名法】
Constant Variable Naming Regulations
k*
【谷歌C++代码编写规范】
Macro Definition Regulations
All uppercase words and underscores
【谷歌C++代码编写规范】
Examples:
typdef struct{
} StructPressedStatus;
typdef class{
} ClassScreen;
StructPressedStatus sPressedStatus;
ClassScreen clsScreen;
std::string strUsername;
std::string strPassword;
Function Naming Regulations
AR_Module_Function()
Example:
void AR_Lcd_Init(){//Alex Rocket Lcd driver Init Function
}