Modularize main.c into rgb, event, database, ui, system, and app_manager modules

This commit is contained in:
Antigravity IDE
2026-07-15 16:14:30 +08:00
parent 30a2e1680b
commit 7ebe802410
15 changed files with 2216 additions and 2124 deletions

31
App/system.h Normal file
View File

@@ -0,0 +1,31 @@
#ifndef __SYSTEM_H__
#define __SYSTEM_H__
#include "config.h"
// GPIO 与系统外设初始化
void GPIO_Init(void);
void Uart1_Init(void);
// 延时与时间工具函数
void Delay_ms(u16 ms);
void Delay10us(void);
void Delay_us(u16 us);
u16 GetTimer0_Safe(void);
// 串口数据打印函数
void Uart_SendByte(u8 dat);
void Uart_SendString(char *s);
char Uart_RxChar(void);
void Uart_SendHex4(u8 val);
void Uart_SendHex8(u8 val);
void Uart_SendHex16(u16 val);
void Uart_SendHex20(u32 val);
void Uart_SendHex32(u32 val);
void FormatHex(u32 val, char *buf);
// 电源管理与休眠唤醒
void Enter_Low_Power_Sleep(void);
void Wakeup_Restore(void);
#endif