|
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 | |
Public Member Functions inherited from LibXR::Timebase | |
| Timebase ()=default | |
| 默认构造函数。 Default constructor. | |
| Timebase (const Timebase &)=delete | |
| 禁止拷贝构造。 Copy construction is disabled. | |
| Timebase & | operator= (const Timebase &)=delete |
| 禁止拷贝赋值。 Copy assignment is disabled. | |
Static Public Attributes | |
| static TIM_HandleTypeDef * | htim = nullptr |
| 硬件定时器句柄静态指针 / Static pointer to timer handle | |
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 bool | IsReady () noexcept |
| 检查时间基是否已经初始化。 Check whether the active timebase backend is initialized. | |
| static void | DelayMicroseconds (uint32_t us) |
| 微秒级延时 / Delay in microseconds | |
Static Protected Member Functions inherited from LibXR::Timebase | |
| static void | SetReady (bool ready=true) noexcept |
| 设置时间基就绪状态。 Set the timebase ready flag. | |
| static void | ConfigureWrapRange (uint64_t max_valid_us, uint32_t max_valid_ms) noexcept |
| 配置时间戳回绕上界。 Configure the timestamp wraparound limits. | |
| static uint64_t | GetConfiguredWrapRangeUs () noexcept |
| 读取当前配置的微秒回绕上界。 Read the configured microsecond wraparound limit. | |
| static uint32_t | GetConfiguredWrapRangeMs () noexcept |
| 读取当前配置的毫秒回绕上界。 Read the configured millisecond wraparound limit. | |
STM32 硬件定时器时间基准实现 / STM32 timer-based timebase implementation.
Definition at line 28 of file stm32_timebase.hpp.
| STM32TimerTimebase::STM32TimerTimebase | ( | TIM_HandleTypeDef * | timer | ) |
构造函数 / Constructor
| timer | 定时器句柄指针 / Pointer to timer handle |
选择硬件定时器作为当前时间基后端,并缓存句柄供静态入口使用。 Selects the hardware timer as the active backend and caches the handle for the static entry points.
Definition at line 102 of file stm32_timebase.cpp.
|
static |
硬件定时器句柄静态指针 / Static pointer to timer handle
Definition at line 44 of file stm32_timebase.hpp.