summaryrefslogtreecommitdiff
path: root/components/drivers/include
diff options
context:
space:
mode:
authorTrisuborn <[email protected]>2021-01-20 23:47:18 +0800
committerTrisuborn <[email protected]>2021-01-20 23:47:18 +0800
commit55402e19db41f6c8a706782572a177f61b4e93ef (patch)
treea8faf1132c9f7c817ec4aff70e66636bc1a8b5ba /components/drivers/include
parent63239801d9a2abe1b210faf6cd9f3b126924f7e0 (diff)
优化互补PWM输出功能的实现逻辑,兼容原本API,增加互补PWM使能/失能命令
Diffstat (limited to 'components/drivers/include')
-rw-r--r--components/drivers/include/drivers/rt_drv_pwm.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/components/drivers/include/drivers/rt_drv_pwm.h b/components/drivers/include/drivers/rt_drv_pwm.h
index a4d64fbc12..59d670714d 100644
--- a/components/drivers/include/drivers/rt_drv_pwm.h
+++ b/components/drivers/include/drivers/rt_drv_pwm.h
@@ -18,6 +18,8 @@
#define PWM_CMD_DISABLE (128 + 1)
#define PWM_CMD_SET (128 + 2)
#define PWM_CMD_GET (128 + 3)
+#define PWMN_CMD_ENABLE (128 + 4)
+#define PWMN_CMD_DISABLE (128 + 5)/
struct rt_pwm_configuration
{
@@ -46,8 +48,8 @@ struct rt_device_pwm
rt_err_t rt_device_pwm_register(struct rt_device_pwm *device, const char *name, const struct rt_pwm_ops *ops, const void *user_data);
-rt_err_t rt_pwm_enable(struct rt_device_pwm *device, int channel, rt_uint8_t complementary);
-rt_err_t rt_pwm_disable(struct rt_device_pwm *device, int channel, rt_uint8_t complementary);
+rt_err_t rt_pwm_enable(struct rt_device_pwm *device, int channel);
+rt_err_t rt_pwm_disable(struct rt_device_pwm *device, int channel);
rt_err_t rt_pwm_set(struct rt_device_pwm *device, int channel, rt_uint32_t period, rt_uint32_t pulse);
#endif /* __DRV_PWM_H_INCLUDE__ */