/* * 主机侧单测桩:dbg_log.h * 模块功能:为 task_watchdog.c 提供主机可编译的日志宏(映射到 printf / 计数)。 * * ⚠ 仅供 test/host/watchdog/ 使用,不参与 MCU 构建。 * * 与 simulator/dbg_log.h 同思路:MCU 版依赖 sys_clock(RTC 时间戳)与 USART, * 主机侧替换为 printf,并把 DBG_ERROR 计入计数器供单测断言("停喂时是否打了 * [WD] task stall" 是可观测行为的一部分)。 * * 创建日期:2026-10-01 */ #ifndef DBG_LOG_H #define DBG_LOG_H #include /* 测试期望的"最后遗言"计数(在 watchdog_test.c 实现,单测断言其增量) */ extern int g_wdtest_err_count; /* 断言:停喂时应恰好出现若干条 DBG_ERROR([WD] task stall) */ #define DBG_INFO(fmt, ...) do { } while (0) #define DBG_DEBUG(fmt, ...) do { } while (0) #define DBG_ERROR(fmt, ...) do { g_wdtest_err_count++; } while (0) #endif /* DBG_LOG_H */