summaryrefslogtreecommitdiff
path: root/components/drivers/include
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2021-01-21 11:58:52 +0800
committerGitHub <[email protected]>2021-01-21 11:58:52 +0800
commit7ed63ef52bdfa01524a7dd6f85fe5226ac5a2d59 (patch)
treedcb4250de4ba22c4e5c64662f3eee4c9c15808cb /components/drivers/include
parent215c899cc90062a5bf11d56de2620af837a6ef62 (diff)
parent68e5c6f511859df77af5f32eed999e04525d3fa2 (diff)
Merge pull request #4250 from Trisuborn/master
为stm32的PWM驱动添加对STM32H7的支持、添加互补PWM功能的支持,补全pwm_get命令等
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;