|
HF Interface Wrapper 0.1.0-dev
Embedded C++ hardware abstraction layer
|
Abstract base class for periodic timer implementations in the HardFOC system. More...
Go to the source code of this file.
Classes | |
| struct | hf_timer_stats_t |
| Timer statistics structure. More... | |
| struct | hf_timer_statistics_t |
| Timer operation statistics. More... | |
| struct | hf_timer_diagnostics_t |
| Timer diagnostic information. More... | |
| class | BasePeriodicTimer |
| Abstract base class for periodic timer operations. More... | |
Macros | |
| #define | HF_TIMESTAMP_US_T_DEFINED |
| #define | HF_TIMER_ERR_LIST(X) |
| HardFOC Timer error codes. | |
| #define | X(name, value, desc) name = value, |
| #define | X(NAME, VALUE, DESC) |
Typedefs | |
| using | hf_timestamp_us_t = hf_u64_t |
| using | hf_timer_callback_t = void (*)(void* user_data) |
| Timer callback function type. | |
Enumerations | |
| enum class | hf_timer_err_t : hf_i32_t { X , TIMER_SUCCESS = 0 , TIMER_ERR_FAILURE = 1 , TIMER_ERR_NOT_INITIALIZED = 2 , TIMER_ERR_ALREADY_INITIALIZED = 3 , TIMER_ERR_INVALID_PARAMETER = 4 , TIMER_ERR_NULL_POINTER = 5 , TIMER_ERR_OUT_OF_MEMORY = 6 , TIMER_ERR_ALREADY_RUNNING = 7 , TIMER_ERR_NOT_RUNNING = 8 , TIMER_ERR_INVALID_PERIOD = 9 , TIMER_ERR_RESOURCE_BUSY = 10 , TIMER_ERR_HARDWARE_FAULT = 11 , TIMER_ERR_UNSUPPORTED_OPERATION = 12 , TIMER_ERR_UNKNOWN = 13 } |
Functions | |
| constexpr std::string_view | HfTimerErrToString (hf_timer_err_t err) noexcept |
| Convert timer error code to string view. | |
Abstract base class for periodic timer implementations in the HardFOC system.
This header-only file defines the abstract base class for periodic timer functionality that provides a consistent API across different timer implementations. Concrete implementations for various platforms inherit from this class to provide high-precision periodic callbacks, interval timing, and timer management features.
| #define HF_TIMER_ERR_LIST | ( | X | ) |
HardFOC Timer error codes.
Comprehensive error enumeration for all timer operations in the system. This enumeration is used across all timer-related classes to provide consistent error reporting and handling.
| #define HF_TIMESTAMP_US_T_DEFINED |
| #define X | ( | name, | |
| value, | |||
| desc ) name = value, |
| #define X | ( | NAME, | |
| VALUE, | |||
| DESC ) |
| using hf_timer_callback_t = void (*)(void* user_data) |
Timer callback function type.
| user_data | User-provided data passed to callback |
| using hf_timestamp_us_t = hf_u64_t |
|
strong |
|
constexprnoexcept |
Convert timer error code to string view.
| err | The error code to convert |