|
HF Interface Wrapper 0.1.0-dev
Embedded C++ hardware abstraction layer
|
Platform-agnostic hardware type definitions for the HardFOC system. More...
#include <cstdint>#include <limits>Go to the source code of this file.
Typedefs | |
| using | hf_u8_t = uint8_t |
| Platform-agnostic 8-bit unsigned integer type. | |
| using | hf_u16_t = uint16_t |
| Platform-agnostic 16-bit unsigned integer type. | |
| using | hf_u32_t = uint32_t |
| Platform-agnostic 32-bit unsigned integer type. | |
| using | hf_u64_t = uint64_t |
| Platform-agnostic 64-bit unsigned integer type. | |
| using | hf_i8_t = int8_t |
| Platform-agnostic 8-bit signed integer type. | |
| using | hf_i16_t = int16_t |
| Platform-agnostic 16-bit signed integer type. | |
| using | hf_i32_t = int32_t |
| Platform-agnostic 32-bit signed integer type. | |
| using | hf_i64_t = int64_t |
| Platform-agnostic 64-bit signed integer type. | |
| using | hf_bool_t = bool |
| Platform-agnostic boolean type. | |
| using | hf_pin_num_t = hf_i32_t |
| Platform-agnostic GPIO pin number type. | |
| using | hf_port_num_t = hf_u32_t |
| Platform-agnostic port/controller identifier type. | |
| using | hf_host_id_t = hf_u32_t |
| Platform-agnostic host/controller identifier type. | |
| using | hf_frequency_hz_t = hf_u32_t |
| Platform-agnostic frequency type (in Hz). | |
| using | hf_frequency_t = hf_frequency_hz_t |
| Backward compatibility alias. | |
| using | hf_baud_rate_t = hf_u32_t |
| Platform-agnostic baud rate type. | |
| using | hf_channel_id_t = hf_u32_t |
| Platform-agnostic channel identifier type. | |
| using | hf_time_t = hf_u32_t |
| Platform-agnostic time type in milliseconds. | |
| using | hf_timeout_ms_t = hf_time_t |
| Timeout value in milliseconds. | |
| using | hf_timeout_us_t = hf_time_t |
| Timeout value in microseconds. | |
| using | hf_timestamp_us_t = hf_u64_t |
| Timestamp value in microseconds. | |
Functions | |
| constexpr bool | IsValidPin (hf_pin_num_t pin) noexcept |
| Check if a pin number is valid. | |
| constexpr bool | IsValidPort (hf_port_num_t port) noexcept |
| Check if a port number is valid. | |
| constexpr bool | IsValidHost (hf_host_id_t host) noexcept |
| Check if a host ID is valid. | |
| constexpr bool | IsValidChannel (hf_channel_id_t channel) noexcept |
| Check if a channel ID is valid. | |
Variables | |
| constexpr hf_pin_num_t | HF_INVALID_PIN = -1 |
| Invalid pin constant for unassigned or invalid pins. | |
| constexpr hf_pin_num_t | HF_MAX_PIN_NUMBER = 255 |
| Maximum pin number supported by the abstraction layer. | |
| constexpr hf_port_num_t | HF_INVALID_PORT = std::numeric_limits<hf_port_num_t>::max() |
| Invalid port constant for unassigned or invalid ports. | |
| constexpr hf_host_id_t | HF_INVALID_HOST = std::numeric_limits<hf_host_id_t>::max() |
| Invalid host constant for unassigned or invalid hosts. | |
| constexpr hf_channel_id_t | HF_INVALID_CHANNEL = std::numeric_limits<hf_channel_id_t>::max() |
| Invalid channel constant for unassigned or invalid channels. | |
| constexpr hf_time_t | HF_TIMEOUT_DEFAULT_MS = 1000 |
| Default timeout value in milliseconds. | |
| constexpr hf_time_t | HF_TIMEOUT_NONE = 0 |
| No timeout (wait indefinitely). | |
| constexpr hf_time_t | HF_TIMEOUT_MAX = std::numeric_limits<hf_time_t>::max() |
| Maximum timeout value. | |
Platform-agnostic hardware type definitions for the HardFOC system.
This file defines platform-agnostic types used by base interface classes. These types provide a consistent API across different hardware platforms without exposing MCU-specific implementation details. All hardware abstraction layers use these common types for portability and consistency.
| using hf_baud_rate_t = hf_u32_t |
Platform-agnostic baud rate type.
| using hf_bool_t = bool |
Platform-agnostic boolean type.
Wraps bool for consistent naming and future extensibility.
| using hf_channel_id_t = hf_u32_t |
Platform-agnostic channel identifier type.
Used for ADC channels, PWM channels, etc.
| using hf_frequency_hz_t = hf_u32_t |
Platform-agnostic frequency type (in Hz).
| using hf_frequency_t = hf_frequency_hz_t |
Backward compatibility alias.
| using hf_host_id_t = hf_u32_t |
Platform-agnostic host/controller identifier type.
Used for SPI hosts, I2C controllers, etc.
| using hf_i16_t = int16_t |
Platform-agnostic 16-bit signed integer type.
Wraps int16_t for consistent naming across the HardFOC system.
| using hf_i32_t = int32_t |
Platform-agnostic 32-bit signed integer type.
Wraps int32_t for consistent naming across the HardFOC system.
| using hf_i64_t = int64_t |
Platform-agnostic 64-bit signed integer type.
Wraps int64_t for consistent naming across the HardFOC system.
| using hf_i8_t = int8_t |
Platform-agnostic 8-bit signed integer type.
Wraps int8_t for consistent naming across the HardFOC system.
| using hf_pin_num_t = hf_i32_t |
Platform-agnostic GPIO pin number type.
Generic pin identifier that works across different hardware platforms. Uses hf_i32_t to handle both positive pin numbers and invalid (-1) values.
| using hf_port_num_t = hf_u32_t |
Platform-agnostic port/controller identifier type.
Generic identifier for communication ports (I2C, SPI, UART, etc.). Uses hf_u32_t to accommodate various controller numbering schemes.
| using hf_timeout_ms_t = hf_time_t |
Timeout value in milliseconds.
| using hf_timeout_us_t = hf_time_t |
Timeout value in microseconds.
| using hf_timestamp_us_t = hf_u64_t |
Timestamp value in microseconds.
| using hf_u16_t = uint16_t |
Platform-agnostic 16-bit unsigned integer type.
Wraps uint16_t for consistent naming across the HardFOC system.
| using hf_u32_t = uint32_t |
Platform-agnostic 32-bit unsigned integer type.
Wraps uint32_t for consistent naming across the HardFOC system.
| using hf_u64_t = uint64_t |
Platform-agnostic 64-bit unsigned integer type.
Wraps uint64_t for consistent naming across the HardFOC system.
| using hf_u8_t = uint8_t |
Platform-agnostic 8-bit unsigned integer type.
Wraps uint8_t for consistent naming across the HardFOC system.
|
constexprnoexcept |
Check if a channel ID is valid.
| channel | Channel ID to validate |
|
constexprnoexcept |
Check if a host ID is valid.
| host | Host ID to validate |
|
constexprnoexcept |
Check if a pin number is valid.
| pin | Pin number to validate |
|
constexprnoexcept |
Check if a port number is valid.
| port | Port number to validate |
|
constexpr |
Invalid channel constant for unassigned or invalid channels.
|
constexpr |
Invalid host constant for unassigned or invalid hosts.
|
constexpr |
Invalid pin constant for unassigned or invalid pins.
|
constexpr |
Invalid port constant for unassigned or invalid ports.
|
constexpr |
Maximum pin number supported by the abstraction layer.
|
constexpr |
Default timeout value in milliseconds.
Maximum timeout value.
|
constexpr |
No timeout (wait indefinitely).