|
libxr
Embedded C++ framework for bare-metal, RTOS and Linux
|
STM32 PWM 驱动实现 / STM32 PWM driver implementation. More...
#include <stm32_pwm.hpp>
Public Member Functions | |
| 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 | 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 | |
STM32 PWM 驱动实现 / STM32 PWM driver implementation.
Definition at line 15 of file stm32_pwm.hpp.
| STM32PWM::STM32PWM | ( | TIM_HandleTypeDef * | htim, |
| uint32_t | channel, | ||
| bool | complementary = false ) |
构造 PWM 对象 / Construct PWM object
Definition at line 41 of file stm32_pwm.cpp.
|
overridevirtual |
禁用 PWM 输出 / Disables the PWM output.
Implements LibXR::PWM.
Definition at line 257 of file stm32_pwm.cpp.
|
overridevirtual |
启用 PWM 输出 / Enables the PWM output.
Implements LibXR::PWM.
Definition at line 238 of file stm32_pwm.cpp.
|
overridevirtual |
配置 PWM 参数 / Configures the PWM settings.
Implements LibXR::PWM.
Definition at line 97 of file stm32_pwm.cpp.
|
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.
Definition at line 46 of file stm32_pwm.cpp.