libxr  1.0
Want to be the best embedded framework
Loading...
Searching...
No Matches
ch32_timebase.hpp
1#pragma once
2
3#include "libxr.hpp"
4
5#include DEF2STR(LIBXR_CH32_CONFIG_FILE)
6
7extern uint32_t SystemCoreClock;
8
9namespace LibXR
10{
11
15class CH32Timebase : public Timebase
16{
17 public:
25
30 static inline void OnSysTickInterrupt();
31
37 void Sync(uint32_t ticks);
38
43 static inline volatile uint32_t sys_tick_ms_ = 0;
44};
45
46} // namespace LibXR
CH32 时间基准实现 / CH32 timebase implementation.
void Sync(uint32_t ticks)
同步毫秒计数器。 Synchronize the millisecond counter.
static void OnSysTickInterrupt()
SysTick 中断入口辅助函数。 Helper called from the SysTick interrupt path.
static volatile uint32_t sys_tick_ms_
SysTick 毫秒计数器。 SysTick millisecond counter.
CH32Timebase()
构造函数 / Constructor
时间基类,用于提供高精度时间戳。 Timebase class for providing high-precision timestamps.
Definition timebase.hpp:17
LibXR 命名空间
Definition ch32_can.hpp:14