Abstract base class for PWM (Pulse Width Modulation) control. PWM(脉冲宽度调制)控制的抽象基类。
virtual ErrorCode SetDutyCycle(float value)=0
Sets the duty cycle of the PWM signal. 设置 PWM 信号的占空比。
virtual ErrorCode Disable()=0
Disables the PWM output. 禁用 PWM 输出。
virtual ErrorCode Enable()=0
Enables the PWM output. 启用 PWM 输出。
virtual ErrorCode SetConfig(Configuration config)=0
Configures the PWM settings. 配置 PWM 参数。
Configuration parameters for PWM. PWM 配置参数。
uint32_t frequency
PWM signal frequency in Hz. PWM 信号的频率(Hz)。