|
libxr
Embedded C++ framework for bare-metal, RTOS and Linux
|
ESP32 PWM driver implementation. More...
#include <esp_pwm.hpp>
Public Member Functions | |
| ESP32PWM (int gpio_num, ledc_channel_t channel, ledc_timer_t timer=LEDC_TIMER_0, ledc_timer_bit_t resolution=static_cast< ledc_timer_bit_t >(static_cast< uint8_t >(LEDC_TIMER_BIT_MAX) - 1)) | |
| Construct a PWM channel object. | |
| ErrorCode | SetDutyCycle (float value) override |
| 设置 PWM 信号的占空比 / Sets the duty cycle of the PWM signal. | |
| ErrorCode | SetConfig (Configuration config) override |
| 配置 PWM 参数 / Configures the PWM settings. | |
| ErrorCode | Enable () override |
| 启用 PWM 输出 / Enables the PWM output. | |
| ErrorCode | Disable () override |
| 禁用 PWM 输出 / Disables the PWM output. | |
Public Member Functions inherited from LibXR::PWM | |
ESP32 PWM driver implementation.
Definition at line 13 of file esp_pwm.hpp.
|
inline |
Construct a PWM channel object.
Definition at line 17 of file esp_pwm.hpp.
|
inlineoverridevirtual |
禁用 PWM 输出 / Disables the PWM output.
Implements LibXR::PWM.
Definition at line 102 of file esp_pwm.hpp.
|
inlineoverridevirtual |
启用 PWM 输出 / Enables the PWM output.
Implements LibXR::PWM.
Definition at line 95 of file esp_pwm.hpp.
|
inlineoverridevirtual |
配置 PWM 参数 / Configures the PWM settings.
Implements LibXR::PWM.
Definition at line 63 of file esp_pwm.hpp.
|
inlineoverridevirtual |
设置 PWM 信号的占空比 / Sets the duty cycle of the PWM signal.
| value | 占空比,浮点值(0.0 到 1.0)。 The duty cycle as a floating-point value (0.0 to 1.0). |
Implements LibXR::PWM.
Definition at line 45 of file esp_pwm.hpp.