修复规范矛盾并定案5项规则,保护宏统一XXX_H

规则定案:常量在右(a>5)、保护宏XXX_H(禁双下划线)、
头文件常量用#define、存储类前缀(g_/s_)优先、允许void返回值
全库32个.h头文件保护宏 __XXX_H → XXX_H 改名(字节级替换)
S1检查规则同步更新(拒绝双下划线),Inc/gpio.h 反向验证被正确拦截
规范示例矛盾修复:K&R括号、标准类型、变量初始化、命名常量、注释字段补全
This commit is contained in:
2026-09-01 16:07:00 +08:00
parent 2b66f96d01
commit bb76cfd779
35 changed files with 158 additions and 138 deletions
+3 -3
View File
@@ -7,8 +7,8 @@
* 修改记录:
* 2026-08-29 王建锋 创建初始版本
*/
#ifndef __UI_MENU_H
#define __UI_MENU_H
#ifndef UI_MENU_H
#define UI_MENU_H
#ifdef __cplusplus
extern "C" {
@@ -29,4 +29,4 @@ int ui_menu_init(void);
}
#endif
#endif /* __UI_MENU_H */
#endif /* UI_MENU_H */
+3 -3
View File
@@ -8,8 +8,8 @@
* 2026-08-29 王建锋 创建初始版本
* 2026-08-29 王建锋 修正监听端口为 7003,与 DTU-RemoteLCD 客户端默认端口对齐
*/
#ifndef __UI_NET_SINK_H
#define __UI_NET_SINK_H
#ifndef UI_NET_SINK_H
#define UI_NET_SINK_H
#include <stdint.h>
@@ -54,4 +54,4 @@ void ui_net_sink_poll(void);
}
#endif
#endif /* __UI_NET_SINK_H */
#endif /* UI_NET_SINK_H */
+3 -3
View File
@@ -7,8 +7,8 @@
* 修改记录:
* 2026-08-29 王建锋 创建初始版本
*/
#ifndef __UI_PORT_H
#define __UI_PORT_H
#ifndef UI_PORT_H
#define UI_PORT_H
#include <stdint.h>
#include <stddef.h>
@@ -76,4 +76,4 @@ void ui_port_step(uint32_t tick_ms);
}
#endif
#endif /* __UI_PORT_H */
#endif /* UI_PORT_H */