libxr  1.0
Want to be the best embedded framework
Loading...
Searching...
No Matches
esp_timebase.hpp
1#pragma once
2
3#include "esp_def.hpp"
4
5#include "esp_timer.h"
6#include "soc/soc_caps.h"
7#if SOC_SYSTIMER_SUPPORTED
8#include "hal/systimer_hal.h"
9#endif
10#include "timebase.hpp"
11
12namespace LibXR
13{
14
23class ESP32Timebase : public Timebase
24{
25 public:
30
36
42
43 private:
44#if SOC_SYSTIMER_SUPPORTED
45 systimer_hal_context_t systimer_hal_ = {};
46 bool systimer_ready_ = false;
47#endif
48};
49
50} // namespace LibXR
ESP32 时间基准实现 / ESP32 timebase implementation.
ESP32Timebase()
构造函数 / Constructor
MicrosecondTimestamp _get_microseconds() override
获取当前微秒计数 / Get current timestamp in microseconds
MillisecondTimestamp _get_milliseconds() override
获取当前毫秒计数 / Get current timestamp in milliseconds
表示微秒级时间戳的类。Class representing a timestamp in microseconds.
表示毫秒级时间戳的类。Class representing a timestamp in milliseconds.
时间基类,用于提供高精度时间戳。 Timebase class for providing high-precision timestamps.
Definition timebase.hpp:18
LibXR 命名空间
Definition ch32_can.hpp:14