第一次提交

This commit is contained in:
2025-07-05 20:11:15 +08:00
commit 89b0708dfb
56 changed files with 10876 additions and 0 deletions

35
app/app_frm_timer.h Normal file
View File

@@ -0,0 +1,35 @@
#ifndef APP_FRM_TIMER_H
#define APP_FRM_TIMER_H
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
#define MAX_TIMERS 100 // 定义最大定时器数量
// 定时器结构体定义
typedef struct Timer {
uint32_t target_time;
uint32_t elapsed_time;
uint32_t start_time;
unsigned char active;
unsigned char priority;
struct Timer *next;
} Timer;
// 函数声明
void timerInit(Timer *timer);
void timerStart(Timer *timer, uint32_t target_time, unsigned char priority);
void timerStop(Timer *timer);
void timerUpdateAll(void);
uint32_t getCurrentTimerCount(void);
#ifdef __cplusplus
}
#endif
#endif // APP_FRM_TIMER_H