|
libxr
1.0
Want to be the best embedded framework
|
STM32 硬件定时器时间基准实现 / STM32 timer-based timebase implementation. More...
#include <stm32_timebase.hpp>
Public Member Functions | |
| STM32TimerTimebase (TIM_HandleTypeDef *timer) | |
| 构造函数 / Constructor | |
| MicrosecondTimestamp | _get_microseconds () |
| 获取当前微秒计数 / Get current timestamp in microseconds | |
| MillisecondTimestamp | _get_milliseconds () |
| 获取当前毫秒计数 / Get current timestamp in milliseconds | |
Public Member Functions inherited from LibXR::Timebase | |
| Timebase (uint64_t max_valid_us=UINT64_MAX, uint32_t max_valid_ms=UINT32_MAX) | |
| 默认构造函数,初始化全局时间基指针。 Default constructor, initializing the global timebase pointer. | |
Static Public Attributes | |
| static TIM_HandleTypeDef * | htim = nullptr |
| 硬件定时器句柄静态指针 / Static pointer to timer handle | |
Static Public Attributes inherited from LibXR::Timebase | |
| static Timebase * | timebase = nullptr |
| 静态指针,用于存储全局时间基对象。 Static pointer storing the global timebase instance. | |
Additional Inherited Members | |
Static Public Member Functions inherited from LibXR::Timebase | |
| static MicrosecondTimestamp | GetMicroseconds () |
| 获取当前时间的微秒级时间戳。 Gets the current timestamp in microseconds. | |
| static MillisecondTimestamp | GetMilliseconds () |
| 获取当前时间的毫秒级时间戳。 Gets the current timestamp in milliseconds. | |
| static void | DelayMicroseconds (uint32_t us) |
| 微秒级延时 / Delay in microseconds | |
STM32 硬件定时器时间基准实现 / STM32 timer-based timebase implementation.
Definition at line 39 of file stm32_timebase.hpp.
| STM32TimerTimebase::STM32TimerTimebase | ( | TIM_HandleTypeDef * | timer | ) |
构造函数 / Constructor
| timer | 定时器句柄指针 / Pointer to timer handle |
Definition at line 44 of file stm32_timebase.cpp.
|
virtual |
获取当前微秒计数 / Get current timestamp in microseconds
Implements LibXR::Timebase.
Definition at line 50 of file stm32_timebase.cpp.
|
virtual |
获取当前毫秒计数 / Get current timestamp in milliseconds
Implements LibXR::Timebase.
Definition at line 79 of file stm32_timebase.cpp.
|
static |
硬件定时器句柄静态指针 / Static pointer to timer handle
Definition at line 65 of file stm32_timebase.hpp.