|
libxr
1.0
Want to be the best embedded framework
|
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 |
| Sets the duty cycle of the PWM signal. 设置 PWM 信号的占空比。 | |
| ErrorCode | SetConfig (Configuration config) override |
| Configures the PWM settings. 配置 PWM 参数。 | |
| ErrorCode | Enable () override |
| Enables the PWM output. 启用 PWM 输出。 | |
| ErrorCode | Disable () override |
| Disables the PWM output. 禁用 PWM 输出。 | |
Public Member Functions inherited from LibXR::PWM | |
Private Attributes | |
| int | gpio_num_ |
| ledc_channel_t | channel_ |
| ledc_timer_t | timer_ |
| ledc_mode_t | speed_mode_ |
| ledc_hal_context_t | hal_ {} |
| ledc_timer_bit_t | resolution_ |
| uint32_t | max_duty_ |
ESP32 PWM driver implementation.
Definition at line 14 of file esp_pwm.hpp.
|
inline |
Construct a PWM channel object.
Definition at line 18 of file esp_pwm.hpp.
|
inlineoverridevirtual |
Disables the PWM output. 禁用 PWM 输出。
Implements LibXR::PWM.
Definition at line 103 of file esp_pwm.hpp.
|
inlineoverridevirtual |
Enables the PWM output. 启用 PWM 输出。
Implements LibXR::PWM.
Definition at line 96 of file esp_pwm.hpp.
|
inlineoverridevirtual |
Configures the PWM settings. 配置 PWM 参数。
Implements LibXR::PWM.
Definition at line 64 of file esp_pwm.hpp.
|
inlineoverridevirtual |
Sets the duty cycle of the PWM signal. 设置 PWM 信号的占空比。
| value | The duty cycle as a floating-point value (0.0 to 1.0). 占空比,浮点值(0.0 到 1.0)。 |
Implements LibXR::PWM.
Definition at line 46 of file esp_pwm.hpp.
|
private |
Definition at line 113 of file esp_pwm.hpp.
|
private |
Definition at line 112 of file esp_pwm.hpp.
|
private |
Definition at line 116 of file esp_pwm.hpp.
|
private |
Definition at line 118 of file esp_pwm.hpp.
|
private |
Definition at line 117 of file esp_pwm.hpp.
|
private |
Definition at line 115 of file esp_pwm.hpp.
|
private |
Definition at line 114 of file esp_pwm.hpp.