|
libxr
Embedded C++ framework for bare-metal, RTOS and Linux
|
CH32 PWM 驱动实现 / CH32 PWM driver implementation. More...
#include <ch32_pwm.hpp>
Public Member Functions | |
| CH32PWM (TIM_TypeDef *tim, uint16_t channel, bool active_high, GPIO_TypeDef *gpio, uint16_t pin, uint32_t pin_remap=0, bool complementary=false) | |
| 构造 PWM 对象 / Construct PWM object | |
| ErrorCode | SetDutyCycle (float value) override |
| 设置 PWM 信号的占空比 / Sets the duty cycle of the PWM signal. | |
| ErrorCode | SetConfig (Configuration config) override |
| 配置 PWM 参数 / Configures the PWM settings. | |
| ErrorCode | Enable () override |
| 启用 PWM 输出 / Enables the PWM output. | |
| ErrorCode | Disable () override |
| 禁用 PWM 输出 / Disables the PWM output. | |
Public Member Functions inherited from LibXR::PWM | |
CH32 PWM 驱动实现 / CH32 PWM driver implementation.
Definition at line 12 of file ch32_pwm.hpp.
|
overridevirtual |
禁用 PWM 输出 / Disables the PWM output.
Implements LibXR::PWM.
|
overridevirtual |
启用 PWM 输出 / Enables the PWM output.
Implements LibXR::PWM.
|
overridevirtual |
配置 PWM 参数 / Configures the PWM settings.
Implements LibXR::PWM.
|
overridevirtual |
设置 PWM 信号的占空比 / Sets the duty cycle of the PWM signal.
| value | 占空比,浮点值(0.0 到 1.0)。 The duty cycle as a floating-point value (0.0 to 1.0). |
Implements LibXR::PWM.