测试:新增 sys_clock 主机侧单测并修复 Zeller 星期缺陷

This commit is contained in:
2026-10-02 11:40:35 +08:00
parent 9f52731ed8
commit fac9d1c409
24 changed files with 5584 additions and 3792 deletions
+28
View File
@@ -0,0 +1,28 @@
/*
* 主机侧单测桩:main.h
* 模块功能:为 sys_clock.c 提供主机可编译的最小替代,仅需 HAL_GetTick() 声明。
*
* ⚠ 仅供 test/host/sys_clock/ 使用,不参与 MCU 构建。
* MCU 构建走真实 Inc/main.h(含 stm32f4xx_hal.h);本文件因 include 路径
* 优先级被优先命中(见 run 脚本 -I 顺序)。
*
* 创建日期:2026-10-02
*/
#ifndef __MAIN_H
#define __MAIN_H
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/* HAL 毫秒时基(MCU 端 = TIM7 中断累加;主机侧由测试单元提供可控时钟) */
uint32_t HAL_GetTick(void);
#ifdef __cplusplus
}
#endif
#endif /* __MAIN_H */