增加调试打印输出

This commit is contained in:
2026-07-19 01:18:33 +08:00
parent f72d08328f
commit 1669cd216d
8 changed files with 196 additions and 87 deletions

35
Drivers/BSP/dbg_cfg.h Normal file
View File

@@ -0,0 +1,35 @@
/*
* 模块名称Debug Output Configuration
* 模块功能:全局调试输出配置,定义各调试级别的编译开关
* 参考 FlashDB fdb_cfg.h 设计模式
* 使用方法:
* - DBG_ENABLE 总开关,定义后启用 DBG_ERROR / DBG_INFO
* - DBG_DEBUG_ENABLE 子开关,同时定义 DBG_ENABLE 后启用 DBG_DEBUG含 __func__:__LINE__
* - 两者都不定义:所有 DBG_* 宏为空操作release 版本)
*
* 用户可在本文件中直接控制,也可在编译器预定义中覆盖
*/
#ifndef __DBG_CFG_H
#define __DBG_CFG_H
#ifdef __cplusplus
extern "C" {
#endif
/*
* 总开关:取消注释启用所有调试输出
*/
/* #define DBG_ENABLE */
/*
* 调试级别开关:取消注释额外输出 DBG_DEBUG 级别
* 仅在 DBG_ENABLE 定义时生效
*/
/* #define DBG_DEBUG_ENABLE */
#ifdef __cplusplus
}
#endif
#endif /* __DBG_CFG_H */