XFusion API v1.3.0
|
用于对接 pwm 设置的参数。 更多...
#include <xf_hal_pwm.h>
成员变量 | |
bool | enable |
uint32_t | freq |
uint32_t | duty |
uint32_t | duty_resolution |
xf_gpio_num_t | io_num |
bool enable |
启用参数,0 为禁用,1 为启用
在文件 xf_hal_pwm.h 第 68 行定义.
uint32_t freq |
频率参数,设置 pwm 频率单位为 hz
在文件 xf_hal_pwm.h 第 69 行定义.
uint32_t duty |
占空比参数,设置 duty ,最大值为 2^duty_resolution - 1
在文件 xf_hal_pwm.h 第 70 行定义.
uint32_t duty_resolution |
占空比分辨率参数,直接影响 duty 的最大值
在文件 xf_hal_pwm.h 第 71 行定义.
xf_gpio_num_t io_num |
输出 IO 参数,指定 pwm 的输出 io
在文件 xf_hal_pwm.h 第 72 行定义.