Unified GPIO base class for all digital GPIO implementations.
uint8_t hf_u8_t
Platform-agnostic 8-bit unsigned integer type.
Definition HardwareTypes.h:40
hf_i32_t hf_pin_num_t
Platform-agnostic GPIO pin number type.
Definition HardwareTypes.h:99
uint16_t hf_u16_t
Platform-agnostic 16-bit unsigned integer type.
Definition HardwareTypes.h:46
STM32 platform-specific type definitions for hardware abstraction.
hf_gpio_drive_cap_t
STM32 GPIO output drive strength (subset aligned with EspTypes_GPIO).
Definition StmTypes.h:103
@ HF_GPIO_DRIVE_CAP_MEDIUM
Unified GPIO base class for all digital GPIO implementations.
Definition BaseGpio.h:294
STM32 GPIO implementation with full HAL integration.
Definition StmGpio.h:38
bool IsPinAvailable() const noexcept override
Check if the pin is available for GPIO operations.
Definition StmGpio.cpp:72
hf_gpio_drive_cap_t drive_cap_
Definition StmGpio.h:110
hf_gpio_pull_mode_t GetPullModeImpl() const noexcept override
Hardware read-back of current pull resistor mode from registers.
Definition StmGpio.cpp:113
hf_gpio_err_t GetDirectionImpl(hf_gpio_direction_t &direction) const noexcept override
Hardware read-back of current pin direction from registers.
Definition StmGpio.cpp:89
hf_gpio_err_t GetOutputModeImpl(hf_gpio_output_mode_t &mode) const noexcept override
Hardware read-back of current output mode from registers.
Definition StmGpio.cpp:101
hf_gpio_err_t GetPinLevelImpl(hf_gpio_level_t &level) noexcept override
Platform-specific implementation for getting pin electrical level.
Definition StmGpio.cpp:127
static StmGpio * s_exti_instances_[16]
Static EXTI dispatch table — one slot per EXTI line (0–15).
Definition StmGpio.h:43
hf_gpio_output_mode_t output_mode_
Definition StmGpio.h:108
hf_u16_t hal_pin_mask_
Definition StmGpio.h:106
hf_gpio_err_t SetPinLevelImpl(hf_gpio_level_t level) noexcept override
Platform-specific implementation for setting pin electrical level.
Definition StmGpio.cpp:115
hf_gpio_err_t SetDirectionImpl(hf_gpio_direction_t direction) noexcept override
Platform-specific implementation for setting pin direction.
Definition StmGpio.cpp:82
void ApplyHalConfig() noexcept
Rebuild and apply HAL_GPIO_Init for the current config.
Definition StmGpio.cpp:134
hf_gpio_err_t SetPullModeImpl(hf_gpio_pull_mode_t mode) noexcept override
Platform-specific implementation for setting pull resistor mode.
Definition StmGpio.cpp:106
const char * GetDescription() const noexcept override
Get human-readable description of this GPIO instance.
Definition StmGpio.cpp:78
GPIO_TypeDef * GetPort() const noexcept
Definition StmGpio.h:90
hf_gpio_pull_mode_t pull_mode_
Definition StmGpio.h:109
hf_gpio_direction_t direction_
Definition StmGpio.h:107
~StmGpio() noexcept override
hf_u8_t GetMaxPins() const noexcept override
Get the maximum number of pins supported by this GPIO instance.
Definition StmGpio.cpp:76
static void ExtiCallbackDispatch(hf_u16_t gpio_pin_mask) noexcept
Route EXTI callback to the registered StmGpio instance.
Definition StmGpio.cpp:80
bool Initialize() noexcept override
Initialize the GPIO pin with current configuration.
Definition StmGpio.cpp:66
GPIO_TypeDef * port_
Definition StmGpio.h:105
hf_u16_t GetHalPinMask() const noexcept
Definition StmGpio.h:91
hf_gpio_err_t SetOutputModeImpl(hf_gpio_output_mode_t mode) noexcept override
Platform-specific implementation for setting output mode.
Definition StmGpio.cpp:94
hf_gpio_level_t
GPIO pin electrical levels.
Definition BaseGpio.h:148
hf_gpio_err_t
HardFOC GPIO error codes.
Definition BaseGpio.h:108
hf_gpio_direction_t
GPIO pin direction/mode configuration.
Definition BaseGpio.h:168
hf_gpio_pull_mode_t
GPIO pull resistor configuration.
Definition BaseGpio.h:188
hf_gpio_output_mode_t
GPIO output drive modes.
Definition BaseGpio.h:178
hf_gpio_active_state_t
GPIO active state polarity configuration.
Definition BaseGpio.h:158
@ HF_GPIO_DIRECTION_INPUT
Pin configured as input.
@ HF_GPIO_PULL_MODE_FLOATING
No pull resistor (floating/high-impedance)
@ HF_GPIO_OUTPUT_MODE_PUSH_PULL
Push-pull output (strong high and low)
@ HF_GPIO_ACTIVE_HIGH
Active state is electrical high.
GPIO configuration for STM32 wrapping CubeMX port/pin.
Definition StmTypes.h:576