5#ifdef HAL_TIM_MODULE_ENABLED
21 STM32PWM(TIM_HandleTypeDef* htim, uint32_t channel,
bool complementary =
false);
32 TIM_HandleTypeDef* htim_;
PWM(脉冲宽度调制)控制的抽象基类。 Abstract base class for PWM (Pulse Width Modulation) control.
STM32 PWM 驱动实现 / STM32 PWM driver implementation.
ErrorCode SetConfig(Configuration config) override
配置 PWM 参数 / Configures the PWM settings.
ErrorCode Disable() override
禁用 PWM 输出 / Disables the PWM output.
STM32PWM(TIM_HandleTypeDef *htim, uint32_t channel, bool complementary=false)
构造 PWM 对象 / Construct PWM object
ErrorCode SetDutyCycle(float value) override
设置 PWM 信号的占空比 / Sets the duty cycle of the PWM signal.
ErrorCode Enable() override
启用 PWM 输出 / Enables the PWM output.
LibXR 命名空间 / LibXR namespace.
ErrorCode
定义错误码枚举 / Defines an enumeration for error codes
PWM 配置参数 / Configuration parameters for PWM.