diff options
| author | GUI <[email protected]> | 2025-12-09 09:49:02 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-12-09 09:49:02 +0800 |
| commit | 6618fa1cf6f6cf7a28fc949ce2f535aa2775cbfd (patch) | |
| tree | e69817e67d17e38cad6bf0123721bdf54fdede67 /components/drivers/include | |
| parent | 69980f8b9d29b38dbd4ddf6373b4b45f3a138409 (diff) | |
[Driver][MISC] Update ADC/PWM (#11003)
* [DM][MISC] Make Kconfig(ADC/PWM) import for DM
* [Driver][MISC][ADC] Fixup ADC
1. Fixup error no.
2. Fixup type of control for args.
3. Fixup value no init.
* [Driver][MISC][PWM] Enable `rt_pwm_get` API
Signed-off-by: GuEe-GUI <[email protected]>
Diffstat (limited to 'components/drivers/include')
| -rw-r--r-- | components/drivers/include/drivers/dev_pwm.h | 8 |
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__ */ |
