|
HF Interface Wrapper 0.1.0-dev
Embedded C++ hardware abstraction layer
|
Namespaces | |
| namespace | pin |
| Convenience aliases for common pins (PA0, PA1, ... PK15) | |
Enumerations | |
| enum class | GpioPort : hf_u8_t { A = 0 , B = 1 , C = 2 , D = 3 , E = 4 , F = 5 , G = 6 , H = 7 , I = 8 , J = 9 , K = 10 } |
| GPIO port index (A=0, B=1, ... K=10) More... | |
| enum class | HalStatus : hf_u8_t { OK = 0x00U , ERROR = 0x01U , BUSY = 0x02U , TIMEOUT = 0x03U } |
| STM32 HAL status codes (mirrors HAL_StatusTypeDef without HAL include) More... | |
Functions | |
| constexpr hf_pin_num_t | EncodePin (GpioPort port, hf_u8_t pin) noexcept |
| Encode (port, pin) → hf_pin_num_t. | |
| constexpr hf_u8_t | DecodePinPort (hf_pin_num_t pin) noexcept |
| Decode hf_pin_num_t → port index. | |
| constexpr hf_u8_t | DecodePinIndex (hf_pin_num_t pin) noexcept |
| Decode hf_pin_num_t → pin within port (0-15) | |
| constexpr hf_u16_t | DecodePinMask (hf_pin_num_t pin) noexcept |
| Decode hf_pin_num_t → STM32 HAL pin mask (GPIO_PIN_0 .. GPIO_PIN_15) | |
| constexpr HalStatus | ToHalStatus (hf_u32_t raw_status) noexcept |
| Convert raw HAL_StatusTypeDef to our enum. | |
| constexpr bool | IsHalOk (hf_u32_t raw_status) noexcept |
| Check if a raw HAL status indicates success. | |
Variables | |
| static constexpr hf_u8_t | kMaxGpioPorts = 11 |
| Maximum GPIO ports (A..K = 11 on largest STM32H7) | |
| static constexpr hf_u8_t | kPinsPerPort = 16 |
| Maximum pins per GPIO port. | |
| static constexpr hf_u16_t | kMaxGpioPins = kMaxGpioPorts * kPinsPerPort |
| Maximum total GPIO pins (ports * pins_per_port) | |
| static constexpr hf_u8_t | kAdcMaxChannels = 20 |
| ADC maximum channels (typical STM32F4/H7) | |
| static constexpr hf_u8_t | kAdcMaxResolutionBits = 16 |
| ADC maximum resolution (bits) | |
| static constexpr hf_u8_t | kAdcDefaultResolutionBits = 12 |
| static constexpr float | kAdcDefaultVrefV = 3.3f |
| ADC reference voltage (V) — most STM32 boards. | |
| static constexpr hf_u32_t | kI2cMaxFreqHz = 1000000 |
| I2C limits. | |
| static constexpr hf_u32_t | kI2cStandardFreqHz = 100000 |
| static constexpr hf_u32_t | kI2cFastFreqHz = 400000 |
| static constexpr hf_u32_t | kI2cFastPlusFreqHz = 1000000 |
| static constexpr hf_u16_t | kI2cMaxTransferBytes = 65535 |
| static constexpr hf_u32_t | kSpiMaxFreqHz = 50000000 |
| SPI limits. | |
| static constexpr hf_u32_t | kSpiDefaultFreqHz = 1000000 |
| static constexpr hf_u16_t | kSpiMaxTransferBytes = 65535 |
| static constexpr hf_u32_t | kUartMaxBaudRate = 10000000 |
| UART limits. | |
| static constexpr hf_u32_t | kUartDefaultBaudRate = 115200 |
| static constexpr hf_u16_t | kUartDefaultBufferSize = 256 |
| static constexpr hf_u64_t | kTimerMinPeriodUs = 1 |
| Timer limits (in microseconds) | |
| static constexpr hf_u64_t | kTimerMaxPeriodUs = 4294967295ULL |
| static constexpr hf_u64_t | kTimerResolutionUs = 1 |
| static constexpr hf_u32_t | kPwmMaxFreqHz = 1000000 |
| PWM limits. | |
| static constexpr hf_u32_t | kPwmMinFreqHz = 1 |
| static constexpr hf_u16_t | kPwmMaxResolution = 65535 |
| static constexpr hf_u8_t | kPwmMaxChannelsPerTimer = 4 |
| static constexpr hf_u32_t | kCanMaxBaudRate = 1000000 |
| CAN limits. | |
| static constexpr hf_u32_t | kCanFdMaxBaudRate = 8000000 |
| static constexpr hf_u16_t | kCanDefaultQueueSize = 16 |
| static constexpr size_t | kNvsMaxKeyLength = 64 |
| Flash/NVS limits. | |
| static constexpr size_t | kNvsMaxValueSize = 4096 |
| static constexpr size_t | kNvsDefaultSectorSize = 4096 |
| static constexpr float | kTempSensorMinC = -40.0f |
| Temperature sensor. | |
| static constexpr float | kTempSensorMaxC = 125.0f |
| static constexpr float | kTempSensorTypAccuracyC = 1.5f |
| static constexpr hf_u32_t | kLoggerMaxMessageLen = 256 |
| Logger. | |
| static constexpr hf_u32_t | kLoggerDefaultBufferSize = 1024 |
|
strong |
|
strong |
|
constexprnoexcept |
Decode hf_pin_num_t → pin within port (0-15)
|
constexprnoexcept |
Decode hf_pin_num_t → STM32 HAL pin mask (GPIO_PIN_0 .. GPIO_PIN_15)
|
constexprnoexcept |
Decode hf_pin_num_t → port index.
|
constexprnoexcept |
Encode (port, pin) → hf_pin_num_t.
|
constexprnoexcept |
Check if a raw HAL status indicates success.
Convert raw HAL_StatusTypeDef to our enum.
|
staticconstexpr |
|
staticconstexpr |
ADC reference voltage (V) — most STM32 boards.
|
staticconstexpr |
ADC maximum channels (typical STM32F4/H7)
|
staticconstexpr |
ADC maximum resolution (bits)
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
CAN limits.
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
I2C limits.
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
Logger.
|
staticconstexpr |
Maximum total GPIO pins (ports * pins_per_port)
|
staticconstexpr |
Maximum GPIO ports (A..K = 11 on largest STM32H7)
|
staticconstexpr |
|
staticconstexpr |
Flash/NVS limits.
|
staticconstexpr |
|
staticconstexpr |
Maximum pins per GPIO port.
|
staticconstexpr |
|
staticconstexpr |
PWM limits.
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
SPI limits.
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
Temperature sensor.
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
Timer limits (in microseconds)
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
UART limits.