6#ifdef HAL_GPIO_MODULE_ENABLED
10#if defined(STM32F0) || defined(STM32G0) || defined(STM32L0)
14#elif defined(STM32WB0)
15 STM32_GPIO_EXTI_GPIOA,
16 STM32_GPIO_EXTI_GPIOB,
24 STM32_GPIO_EXTI_10_15,
26 STM32_GPIO_EXTI_NUMBER
29stm32_gpio_exti_t STM32_GPIO_EXTI_GetID(uint16_t pin);
41 map[STM32_GPIO_EXTI_GetID(
pin)] =
this;
114 return ErrorCode::OK;
117 static STM32GPIO* map[STM32_GPIO_EXTI_NUMBER];
通用输入输出(GPIO)接口类。General Purpose Input/Output (GPIO) interface class.
@ OUTPUT_PUSH_PULL
推挽输出模式。Push-pull output mode.
@ RISING_INTERRUPT
上升沿中断模式。Rising edge interrupt mode.
@ FALL_RISING_INTERRUPT
双沿触发中断模式。Both edge interrupt mode.
@ OUTPUT_OPEN_DRAIN
开漏输出模式。Open-drain output mode.
@ FALL_INTERRUPT
下降沿中断模式。Falling edge interrupt mode.
@ NONE
无上拉或下拉。No pull-up or pull-down.
@ DOWN
下拉模式。Pull-down mode.
bool Read()
读取 GPIO 引脚状态。Reads the GPIO pin state.
ErrorCode SetConfig(Configuration config)
配置 GPIO 引脚参数。Configures the GPIO pin settings.
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.
LibXR Color Control Library / LibXR终端颜色控制库
constexpr auto min(T1 a, T2 b) -> typename std::common_type< T1, T2 >::type
计算两个数的最小值
存储 GPIO 配置参数的结构体。Structure storing GPIO configuration parameters.