libxr
1.0
Want to be the best embedded framework
|
Public Member Functions | |
MicrosecondTimestamp | _get_microseconds () override |
纯虚函数,获取当前时间的微秒级时间戳(由派生类实现)。 Pure virtual function for obtaining the current timestamp in microseconds (implemented by derived classes). | |
MillisecondTimestamp | _get_milliseconds () override |
纯虚函数,获取当前时间的毫秒级时间戳(由派生类实现)。 Pure virtual function for obtaining the current timestamp in milliseconds (implemented by derived classes). | |
void | Sync (uint32_t ticks) |
![]() | |
Timebase (uint64_t max_valid_us=UINT64_MAX, uint32_t max_valid_ms=UINT32_MAX) | |
默认构造函数,初始化全局时间基指针。 Default constructor, initializing the global timebase pointer. | |
Static Public Member Functions | |
static void | OnSysTickInterrupt () |
![]() | |
static MicrosecondTimestamp | GetMicroseconds () |
获取当前时间的微秒级时间戳。 Gets the current timestamp in microseconds. | |
static MillisecondTimestamp | GetMilliseconds () |
获取当前时间的毫秒级时间戳。 Gets the current timestamp in milliseconds. | |
Static Public Attributes | |
static volatile uint32_t | sys_tick_ms = 0 |
![]() | |
static Timebase * | timebase = nullptr |
静态指针,用于存储全局时间基对象。 Static pointer storing the global timebase instance. | |
Definition at line 12 of file ch32_timebase.hpp.
CH32Timebase::CH32Timebase | ( | ) |
Definition at line 5 of file ch32_timebase.cpp.
|
overridevirtual |
纯虚函数,获取当前时间的微秒级时间戳(由派生类实现)。 Pure virtual function for obtaining the current timestamp in microseconds (implemented by derived classes).
该函数需要在派生类中实现,以提供具体的时间获取机制。 This function must be implemented in derived classes to provide the actual time retrieval mechanism.
Implements LibXR::Timebase.
Definition at line 7 of file ch32_timebase.cpp.
|
overridevirtual |
纯虚函数,获取当前时间的毫秒级时间戳(由派生类实现)。 Pure virtual function for obtaining the current timestamp in milliseconds (implemented by derived classes).
该函数需要在派生类中实现,以提供具体的时间获取机制。 This function must be implemented in derived classes to provide the actual time retrieval mechanism.
Implements LibXR::Timebase.
Definition at line 34 of file ch32_timebase.cpp.
|
inlinestatic |
Definition at line 36 of file ch32_timebase.cpp.
void CH32Timebase::Sync | ( | uint32_t | ticks | ) |
Definition at line 38 of file ch32_timebase.cpp.
|
inlinestatic |
Definition at line 25 of file ch32_timebase.hpp.