重构手环软件架构:实现动态挂载前后台 App 框架,解耦拆分源文件,并引入统一日志宏 xtell.h
This commit is contained in:
24
App/xtell.h
Normal file
24
App/xtell.h
Normal file
@@ -0,0 +1,24 @@
|
||||
#ifndef __XTELL_H__
|
||||
#define __XTELL_H__
|
||||
|
||||
#include "config.h"
|
||||
|
||||
// 全局调试日志开关
|
||||
#define XTELL_DEBUG_ENABLE
|
||||
|
||||
// 声明底层串口发送函数 (由 system.c 提供)
|
||||
extern void Uart_SendString(char *p);
|
||||
extern void Uart_SendHex8(u8 val);
|
||||
extern void Uart_SendHex32(u32 val);
|
||||
|
||||
#ifdef XTELL_DEBUG_ENABLE
|
||||
#define XTELL_LOG(s) Uart_SendString(s)
|
||||
#define XTELL_LOG_HEX8(v) Uart_SendHex8(v)
|
||||
#define XTELL_LOG_HEX32(v) Uart_SendHex32(v)
|
||||
#else
|
||||
#define XTELL_LOG(s)
|
||||
#define XTELL_LOG_HEX8(v)
|
||||
#define XTELL_LOG_HEX32(v)
|
||||
#endif
|
||||
|
||||
#endif // __XTELL_H__
|
||||
Reference in New Issue
Block a user