|
Internal Interface Wrap
API reference
|
STM32 GPIO implementation with full HAL integration. More...
#include <StmGpio.h>
Static Public Member Functions | |
| static void | ExtiCallbackDispatch (hf_u16_t gpio_pin_mask) noexcept |
| Route EXTI callback to the registered StmGpio instance. | |
Static Public Member Functions inherited from BaseGpio | |
| static const char * | ToString (hf_gpio_state_t state) noexcept |
| static const char * | ToString (hf_gpio_level_t level) noexcept |
| static const char * | ToString (hf_gpio_active_state_t active_state) noexcept |
| static const char * | ToString (hf_gpio_direction_t direction) noexcept |
| static const char * | ToString (hf_gpio_output_mode_t output_mode) noexcept |
| static const char * | ToString (hf_gpio_pull_mode_t pull_mode) noexcept |
| static const char * | ToString (hf_gpio_interrupt_trigger_t trigger) noexcept |
Private Member Functions | |
| void | ApplyHalConfig () noexcept |
| Rebuild and apply HAL_GPIO_Init for the current config. | |
Private Attributes | |
| GPIO_TypeDef * | port_ |
| hf_u16_t | hal_pin_mask_ |
| hf_gpio_direction_t | direction_ |
| hf_gpio_output_mode_t | output_mode_ |
| hf_gpio_pull_mode_t | pull_mode_ |
| hf_gpio_drive_cap_t | drive_cap_ |
Static Private Attributes | |
| static StmGpio * | s_exti_instances_ [16] = {} |
| Static EXTI dispatch table — one slot per EXTI line (0–15). | |
Additional Inherited Members | |
Protected Attributes inherited from BaseGpio | |
| const hf_pin_num_t | pin_ |
| GPIO pin number/identifier. | |
| bool | initialized_ |
| Initialization state flag. | |
| hf_gpio_direction_t | current_direction_ |
| Current pin direction. | |
| hf_gpio_active_state_t | active_state_ |
| Active state polarity. | |
| hf_gpio_output_mode_t | output_mode_ |
| Output drive mode. | |
| hf_gpio_pull_mode_t | pull_mode_ |
| Pull resistor configuration. | |
| hf_gpio_state_t | current_state_ |
| Current logical state. | |
| hf_gpio_statistics_t | statistics_ |
| GPIO operation statistics. | |
| hf_gpio_diagnostics_t | diagnostics_ |
| GPIO diagnostic information. | |
STM32 GPIO implementation with full HAL integration.
Design:
|
explicitnoexcept |
Full constructor with HAL port + pin mask.
| pin_num | Logical pin number (encoded: port*16 + pin_index). |
| port | GPIO_TypeDef* port (e.g. GPIOA). |
| hal_pin_mask | HAL pin bitmask (e.g. GPIO_PIN_5 = 1<<5). |
| direction | Input / Output / Bidirectional. |
| active_state | Active high / low. |
| output_mode | Push-pull / Open-drain. |
| pull_mode | None / Pull-up / Pull-down. |
| drive_capability | Low / Medium / High / Very-High. |
|
explicitnoexcept |
Construct from config struct.
|
overridedefaultnoexcept |
|
privatenoexcept |
Rebuild and apply HAL_GPIO_Init for the current config.
Route EXTI callback to the registered StmGpio instance.
Usage:
Get human-readable description of this GPIO instance.
Implements BaseGpio.
|
overrideprotectedvirtualnoexcept |
Hardware read-back of current pin direction from registers.
| direction | Output parameter: actual hardware pin direction |
Reads the actual direction configuration from hardware registers. Useful for fault detection and hardware verification.
Implements BaseGpio.
|
inlinenoexcept |
|
overridevirtualnoexcept |
Get the maximum number of pins supported by this GPIO instance.
Implements BaseGpio.
|
overrideprotectedvirtualnoexcept |
Hardware read-back of current output mode from registers.
| mode | Output parameter: actual hardware output mode |
Reads the actual output mode configuration from hardware registers. Useful for fault detection and hardware verification.
Implements BaseGpio.
|
overrideprotectedvirtualnoexcept |
Platform-specific implementation for getting pin electrical level.
| level | Output parameter: current electrical level (Low or High) |
Implements BaseGpio.
|
inlinenoexcept |
|
overrideprotectedvirtualnoexcept |
Hardware read-back of current pull resistor mode from registers.
Reads the actual pull resistor configuration from hardware registers. Useful for fault detection and hardware verification.
Implements BaseGpio.
|
overridevirtualnoexcept |
Initialize the GPIO pin with current configuration.
Implements BaseGpio.
|
overridevirtualnoexcept |
Check if the pin is available for GPIO operations.
Implements BaseGpio.
|
overrideprotectedvirtualnoexcept |
Platform-specific implementation for setting pin direction.
| direction | New pin direction (Input or Output) |
Implements BaseGpio.
|
overrideprotectedvirtualnoexcept |
Platform-specific implementation for setting output mode.
| mode | New output mode (PushPull or OpenDrain) |
Implements BaseGpio.
|
overrideprotectedvirtualnoexcept |
Platform-specific implementation for setting pin electrical level.
| level | New electrical level (Low or High) |
Implements BaseGpio.
|
overrideprotectedvirtualnoexcept |
Platform-specific implementation for setting pull resistor mode.
| mode | New pull resistor mode (Floating, PullUp, PullDown) |
Implements BaseGpio.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
staticprivate |
Static EXTI dispatch table — one slot per EXTI line (0–15).