libxr 1.0
Want to be the best embedded framework
|
Public Member Functions | |
STM32GPIO (GPIO_TypeDef *port, uint16_t pin, IRQn_Type irq=NonMaskableInt_IRQn) | |
bool | Read () |
读取 GPIO 引脚状态。Reads the GPIO pin state. | |
ErrorCode | Write (bool value) |
写入 GPIO 引脚状态。Writes the GPIO pin state. | |
ErrorCode | EnableInterrupt () |
使能 GPIO 引脚中断。Enables the GPIO pin interrupt. | |
ErrorCode | DisableInterrupt () |
禁用 GPIO 引脚中断。Disables the GPIO pin interrupt. | |
ErrorCode | SetConfig (Configuration config) |
配置 GPIO 引脚参数。Configures the GPIO pin settings. | |
![]() | |
GPIO () | |
默认构造函数。Default constructor. | |
ErrorCode | RegisterCallback (Callback<> callback) |
注册 GPIO 事件回调函数。Registers a callback function for GPIO events. | |
Static Public Attributes | |
static STM32GPIO * | map [STM32_GPIO_EXTI_NUMBER] = {nullptr} |
Private Attributes | |
GPIO_TypeDef * | port_ |
uint16_t | pin_ |
IRQn_Type | irq_ |
Additional Inherited Members | |
![]() | |
enum class | Direction : uint8_t { INPUT , OUTPUT_PUSH_PULL , OUTPUT_OPEN_DRAIN , FALL_INTERRUPT , RISING_INTERRUPT , FALL_RISING_INTERRUPT } |
定义 GPIO 引脚的方向类型。Defines the direction types for GPIO pins. More... | |
enum class | Pull : uint8_t { NONE , UP , DOWN } |
定义 GPIO 引脚的上拉/下拉模式。Defines the pull-up/pull-down configurations for GPIO pins. More... | |
![]() | |
Callback | callback_ |
GPIO 事件的回调函数。Callback function for GPIO events. | |
Definition at line 33 of file stm32_gpio.hpp.
|
inline |
Definition at line 36 of file stm32_gpio.hpp.
|
inlinevirtual |
禁用 GPIO 引脚中断。Disables the GPIO pin interrupt.
Implements LibXR::GPIO.
Definition at line 60 of file stm32_gpio.hpp.
|
inlinevirtual |
使能 GPIO 引脚中断。Enables the GPIO pin interrupt.
Implements LibXR::GPIO.
Definition at line 53 of file stm32_gpio.hpp.
|
inlinevirtual |
读取 GPIO 引脚状态。Reads the GPIO pin state.
Implements LibXR::GPIO.
Definition at line 45 of file stm32_gpio.hpp.
|
inlinevirtual |
配置 GPIO 引脚参数。Configures the GPIO pin settings.
Implements LibXR::GPIO.
Definition at line 67 of file stm32_gpio.hpp.
|
inlinevirtual |
写入 GPIO 引脚状态。Writes the GPIO pin state.
value | 要写入的状态,true 表示高电平,false 表示低电平。The value to write, true for high, false for low. |
Implements LibXR::GPIO.
Definition at line 47 of file stm32_gpio.hpp.
|
private |
Definition at line 122 of file stm32_gpio.hpp.
Definition at line 117 of file stm32_gpio.hpp.
|
private |
Definition at line 121 of file stm32_gpio.hpp.
|
private |
Definition at line 120 of file stm32_gpio.hpp.