mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-20 00:45:22 +08:00
优化互补PWM输出功能的实现逻辑,兼容原本API,增加互补PWM使能/失能命令
This commit is contained in:
@@ -18,6 +18,8 @@
|
||||
#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
|
||||
{
|
||||
@@ -46,8 +48,8 @@ struct rt_device_pwm
|
||||
|
||||
rt_err_t rt_device_pwm_register(struct rt_device_pwm *device, const char *name, const struct rt_pwm_ops *ops, const void *user_data);
|
||||
|
||||
rt_err_t rt_pwm_enable(struct rt_device_pwm *device, int channel, rt_uint8_t complementary);
|
||||
rt_err_t rt_pwm_disable(struct rt_device_pwm *device, int channel, rt_uint8_t complementary);
|
||||
rt_err_t rt_pwm_enable(struct rt_device_pwm *device, int channel);
|
||||
rt_err_t rt_pwm_disable(struct rt_device_pwm *device, int channel);
|
||||
rt_err_t rt_pwm_set(struct rt_device_pwm *device, int channel, rt_uint32_t period, rt_uint32_t pulse);
|
||||
|
||||
#endif /* __DRV_PWM_H_INCLUDE__ */
|
||||
|
||||
Reference in New Issue
Block a user