libxr
1.0
Want to be the best embedded framework
|
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))) | |
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 输出。 | |
![]() |
Private Attributes | |
int | gpio_num_ |
ledc_channel_t | channel_ |
ledc_timer_t | timer_ |
ledc_timer_bit_t | resolution_ |
uint32_t | max_duty_ |
Definition at line 10 of file esp_pwm.hpp.
|
inline |
Definition at line 13 of file esp_pwm.hpp.
|
inlineoverridevirtual |
Disables the PWM output. 禁用 PWM 输出。
Implements LibXR::PWM.
Definition at line 84 of file esp_pwm.hpp.
|
inlineoverridevirtual |
Enables the PWM output. 启用 PWM 输出。
Implements LibXR::PWM.
Definition at line 78 of file esp_pwm.hpp.
|
inlineoverridevirtual |
Configures the PWM settings. 配置 PWM 参数。
Implements LibXR::PWM.
Definition at line 57 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 38 of file esp_pwm.hpp.
|
private |
Definition at line 92 of file esp_pwm.hpp.
|
private |
Definition at line 91 of file esp_pwm.hpp.
|
private |
Definition at line 95 of file esp_pwm.hpp.
|
private |
Definition at line 94 of file esp_pwm.hpp.
|
private |
Definition at line 93 of file esp_pwm.hpp.