rt_device_pwm 不符合rtt device命名习惯,改为rt_pwm_device

This commit is contained in:
2023-07-03 09:14:34 +08:00
parent 1563cd3e74
commit d7b97022bc
2 changed files with 22 additions and 22 deletions

View File

@ -35,24 +35,24 @@ struct rt_pwm_configuration
rt_bool_t complementary;
};
struct rt_device_pwm;
struct rt_pwm_device;
struct rt_pwm_ops
{
rt_err_t (*control)(struct rt_device_pwm *device, int cmd, void *arg);
rt_err_t (*control)(struct rt_pwm_device *device, int cmd, void *arg);
};
struct rt_device_pwm
struct rt_pwm_device
{
struct rt_device parent;
const struct rt_pwm_ops *ops;
};
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_device_register(struct rt_pwm_device *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_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);
rt_err_t rt_pwm_set_period(struct rt_device_pwm *device, int channel, rt_uint32_t period);
rt_err_t rt_pwm_set_pulse(struct rt_device_pwm *device, int channel, rt_uint32_t pulse);
rt_err_t rt_pwm_enable(struct rt_pwm_device *device, int channel);
rt_err_t rt_pwm_disable(struct rt_pwm_device *device, int channel);
rt_err_t rt_pwm_set(struct rt_pwm_device *device, int channel, rt_uint32_t period, rt_uint32_t pulse);
rt_err_t rt_pwm_set_period(struct rt_pwm_device *device, int channel, rt_uint32_t period);
rt_err_t rt_pwm_set_pulse(struct rt_pwm_device *device, int channel, rt_uint32_t pulse);
#endif /* __DRV_PWM_H_INCLUDE__ */