summaryrefslogtreecommitdiff
path: root/components/drivers/include
diff options
context:
space:
mode:
Diffstat (limited to 'components/drivers/include')
-rw-r--r--components/drivers/include/drivers/dev_pwm.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/components/drivers/include/drivers/dev_pwm.h b/components/drivers/include/drivers/dev_pwm.h
index bda3fed0c1..6cc70a543f 100644
--- a/components/drivers/include/drivers/dev_pwm.h
+++ b/components/drivers/include/drivers/dev_pwm.h
@@ -201,6 +201,14 @@ rt_err_t rt_pwm_set_dead_time(struct rt_device_pwm *device, int channel, rt_uint
*/
rt_err_t rt_pwm_set_phase(struct rt_device_pwm *device, int channel, rt_uint32_t phase);
+/**
+ * @brief get the PWM configuration
+ * @param device the PWM device
+ * @param cfg the configuration of PWM
+ * @return rt_err_t error code
+ */
+rt_err_t rt_pwm_get(struct rt_device_pwm *device, struct rt_pwm_configuration *cfg);
+
/*! @}*/
#endif /* __DEV_PWM_H__ */