Files
DCU_APP/GD32E508_DCU_APP/sys/systick.h
T
cbb 078ea06317 refactor(device): 移除备份配置文件并完善ADC模块注释
移除不再需要的 .cproject.yml.bak_dma 和 README.md 备份文件,
同时为 ADC.cpp 添加完整的 Doxygen 风格函数注释,提升代码可读性。
2026-05-10 21:27:51 +08:00

42 lines
989 B
C++

#ifndef SYS_SYSTICK_H
#define SYS_SYSTICK_H
#include <stdint.h>
/**
* @brief SysTick 时基模块。
* @note 负责 1ms 系统节拍维护与阻塞式毫秒延时。
*/
class SysTickTimer {
public:
/**
* @brief 初始化 SysTick 为 1ms 系统节拍。
* @param[in] 无。
* @param[out] 无。
* @retval 无返回值。
*/
static void initMs();
/**
* @brief 执行阻塞式毫秒延时。
* @param[in] ms 需要延时的毫秒数。
* @param[out] 无。
* @retval 无返回值。
* @note 基于 1ms 中断递增的节拍计数器实现轮询延时。
*/
static void delayMs(uint32_t ms);
/**
* @brief SysTick 中断处理入口。
* @param[in] 无。
* @param[out] 无。
* @retval 无返回值。
* @note 每毫秒递增内部节拍计数器。
*/
static void onInterrupt();
private:
static volatile uint32_t s_ms;
};
#endif /* SYS_SYSTICK_H */