libxr
1.0
Want to be the best embedded framework
|
Abstract base class for PWM (Pulse Width Modulation) control. PWM(脉冲宽度调制)控制的抽象基类。 More...
#include <pwm.hpp>
Data Structures | |
struct | Configuration |
Configuration parameters for PWM. PWM 配置参数。 More... | |
Public Member Functions | |
virtual ErrorCode | SetDutyCycle (float value)=0 |
Sets the duty cycle of the PWM signal. 设置 PWM 信号的占空比。 | |
virtual ErrorCode | SetConfig (Configuration config)=0 |
Configures the PWM settings. 配置 PWM 参数。 | |
virtual ErrorCode | Enable ()=0 |
Enables the PWM output. 启用 PWM 输出。 | |
virtual ErrorCode | Disable ()=0 |
Disables the PWM output. 禁用 PWM 输出。 | |
Abstract base class for PWM (Pulse Width Modulation) control. PWM(脉冲宽度调制)控制的抽象基类。
|
pure virtual |
Disables the PWM output. 禁用 PWM 输出。
Implemented in LibXR::ESP32PWM, and LibXR::STM32PWM.
|
pure virtual |
Enables the PWM output. 启用 PWM 输出。
Implemented in LibXR::ESP32PWM, and LibXR::STM32PWM.
|
pure virtual |
Configures the PWM settings. 配置 PWM 参数。
Implemented in LibXR::ESP32PWM, and LibXR::STM32PWM.
|
pure virtual |
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)。 |
Implemented in LibXR::ESP32PWM, and LibXR::STM32PWM.