PWM(脉冲宽度调制)控制的抽象基类。 Abstract base class for PWM (Pulse Width Modulation) control.
virtual ErrorCode SetDutyCycle(float value)=0
设置 PWM 信号的占空比 / Sets the duty cycle of the PWM signal.
virtual ErrorCode Disable()=0
禁用 PWM 输出 / Disables the PWM output.
virtual ErrorCode Enable()=0
启用 PWM 输出 / Enables the PWM output.
virtual ErrorCode SetConfig(Configuration config)=0
配置 PWM 参数 / Configures the PWM settings.
LibXR 命名空间 / LibXR namespace.
ErrorCode
定义错误码枚举 / Defines an enumeration for error codes
PWM 配置参数 / Configuration parameters for PWM.
uint32_t frequency
PWM 信号的频率(Hz) / PWM signal frequency in Hz.