重构手环软件架构:实现动态挂载前后台 App 框架,解耦拆分源文件,并引入统一日志宏 xtell.h

This commit is contained in:
Antigravity IDE
2026-07-17 09:08:53 +08:00
parent 8fdbb32f42
commit c0d1fe74f5
18 changed files with 1380 additions and 1155 deletions

24
App/xtell.h Normal file
View 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__