[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 <2991707448@qq.com>
This commit is contained in:
GUI
2025-12-09 09:49:02 +08:00
committed by GitHub
parent 69980f8b9d
commit 6618fa1cf6
4 changed files with 21 additions and 5 deletions
@@ -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__ */