summaryrefslogtreecommitdiff
path: root/components/drivers/include
diff options
context:
space:
mode:
authorMeco Man <[email protected]>2021-01-30 12:33:19 +0800
committerGitHub <[email protected]>2021-01-30 12:33:19 +0800
commit97cc8a8f72838deb0273a3e60ae29319edd7e4f7 (patch)
tree240ca2dbffead9d828c59719b447844ab63c5e52 /components/drivers/include
parent7405618eafd9d0acd1d6da7ccd014700e9c17768 (diff)
parent45963a16b07857fadec81ff1d7cf6d16deeaddb5 (diff)
Merge pull request #14 from RT-Thread/master
pr
Diffstat (limited to 'components/drivers/include')
-rw-r--r--components/drivers/include/drivers/rt_drv_pwm.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/components/drivers/include/drivers/rt_drv_pwm.h b/components/drivers/include/drivers/rt_drv_pwm.h
index 16de4c6ab8..7a8e17b916 100644
--- a/components/drivers/include/drivers/rt_drv_pwm.h
+++ b/components/drivers/include/drivers/rt_drv_pwm.h
@@ -18,12 +18,20 @@
#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
{
rt_uint32_t channel; /* 0-n */
rt_uint32_t period; /* unit:ns 1ns~4.29s:1Ghz~0.23hz */
rt_uint32_t pulse; /* unit:ns (pulse<=period) */
+
+ /*
+ * RT_TRUE : The channel of pwm is complememtary.
+ * RT_FALSE : The channel of pwm is nomal.
+ */
+ rt_bool_t complementary;
};
struct rt_device_pwm;