libxr 1.0
Want to be the best embedded framework
|
Public Member Functions | |
ESP32GPIO (gpio_num_t gpio_num) | |
bool | Read () override |
读取 GPIO 引脚状态。Reads the GPIO pin state. | |
ErrorCode | Write (bool value) override |
写入 GPIO 引脚状态。Writes the GPIO pin state. | |
ErrorCode | EnableInterrupt () override |
使能 GPIO 引脚中断。Enables the GPIO pin interrupt. | |
ErrorCode | DisableInterrupt () override |
禁用 GPIO 引脚中断。Disables the GPIO pin interrupt. | |
ErrorCode | SetConfig (Configuration config) override |
配置 GPIO 引脚参数。Configures the GPIO pin settings. | |
![]() | |
GPIO () | |
默认构造函数。Default constructor. | |
ErrorCode | RegisterCallback (Callback callback) |
注册 GPIO 事件回调函数。Registers a callback function for GPIO events. | |
Static Public Member Functions | |
static void IRAM_ATTR | InterruptDispatcher (void *arg) |
Private Attributes | |
gpio_num_t | gpio_num_ |
Static Private Attributes | |
static bool | isr_service_installed_ = false |
static ESP32GPIO * | map_ [GPIO_NUM_MAX] |
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... | |
using | Callback = LibXR::Callback<> |
![]() | |
Callback | callback_ |
GPIO 事件的回调函数。Callback function for GPIO events. | |
Definition at line 9 of file esp_gpio.hpp.
|
inlineexplicit |
Definition at line 12 of file esp_gpio.hpp.
|
inlineoverridevirtual |
禁用 GPIO 引脚中断。Disables the GPIO pin interrupt.
Implements LibXR::GPIO.
Definition at line 35 of file esp_gpio.hpp.
|
inlineoverridevirtual |
使能 GPIO 引脚中断。Enables the GPIO pin interrupt.
Implements LibXR::GPIO.
Definition at line 22 of file esp_gpio.hpp.
Definition at line 93 of file esp_gpio.hpp.
|
inlineoverridevirtual |
读取 GPIO 引脚状态。Reads the GPIO pin state.
Implements LibXR::GPIO.
Definition at line 14 of file esp_gpio.hpp.
|
inlineoverridevirtual |
配置 GPIO 引脚参数。Configures the GPIO pin settings.
Implements LibXR::GPIO.
Definition at line 42 of file esp_gpio.hpp.
|
inlineoverridevirtual |
写入 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 16 of file esp_gpio.hpp.
|
private |
Definition at line 104 of file esp_gpio.hpp.
Definition at line 105 of file esp_gpio.hpp.
|
inlinestaticprivate |
Definition at line 106 of file esp_gpio.hpp.