diff options
| author | Tangyuxin <[email protected]> | 2022-04-06 21:12:39 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-04-06 21:12:39 +0800 |
| commit | da3d61e043c5f8734e7fd6d8626ec478a272766e (patch) | |
| tree | dc6d5fe2e310ec4824ccf8b0651c51fe4d3d8cb6 /components/drivers/misc | |
| parent | 782b9dd45a10e5e68ac5687fb57649e6c07de93e (diff) | |
[device]Detailed classification of devices types (#5769)
Diffstat (limited to 'components/drivers/misc')
| -rw-r--r-- | components/drivers/misc/adc.c | 2 | ||||
| -rw-r--r-- | components/drivers/misc/dac.c | 2 | ||||
| -rw-r--r-- | components/drivers/misc/pin.c | 2 | ||||
| -rw-r--r-- | components/drivers/misc/rt_drv_pwm.c | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/components/drivers/misc/adc.c b/components/drivers/misc/adc.c index a73fcc54e3..d54a14193b 100644 --- a/components/drivers/misc/adc.c +++ b/components/drivers/misc/adc.c @@ -77,7 +77,7 @@ rt_err_t rt_hw_adc_register(rt_adc_device_t device, const char *name, const stru rt_err_t result = RT_EOK; RT_ASSERT(ops != RT_NULL && ops->convert != RT_NULL); - device->parent.type = RT_Device_Class_Miscellaneous; + device->parent.type = RT_Device_Class_ADC; device->parent.rx_indicate = RT_NULL; device->parent.tx_complete = RT_NULL; diff --git a/components/drivers/misc/dac.c b/components/drivers/misc/dac.c index 2aa5e12124..a17c54d841 100644 --- a/components/drivers/misc/dac.c +++ b/components/drivers/misc/dac.c @@ -76,7 +76,7 @@ rt_err_t rt_hw_dac_register(rt_dac_device_t device, const char *name, const stru rt_err_t result = RT_EOK; RT_ASSERT(ops != RT_NULL && ops->convert != RT_NULL); - device->parent.type = RT_Device_Class_Miscellaneous; + device->parent.type = RT_Device_Class_DAC; device->parent.rx_indicate = RT_NULL; device->parent.tx_complete = RT_NULL; diff --git a/components/drivers/misc/pin.c b/components/drivers/misc/pin.c index 666d221fa6..f12dffdcfc 100644 --- a/components/drivers/misc/pin.c +++ b/components/drivers/misc/pin.c @@ -77,7 +77,7 @@ const static struct rt_device_ops pin_ops = int rt_device_pin_register(const char *name, const struct rt_pin_ops *ops, void *user_data) { - _hw_pin.parent.type = RT_Device_Class_Miscellaneous; + _hw_pin.parent.type = RT_Device_Class_Pin; _hw_pin.parent.rx_indicate = RT_NULL; _hw_pin.parent.tx_complete = RT_NULL; diff --git a/components/drivers/misc/rt_drv_pwm.c b/components/drivers/misc/rt_drv_pwm.c index c60bf6df1d..9016b5ce5f 100644 --- a/components/drivers/misc/rt_drv_pwm.c +++ b/components/drivers/misc/rt_drv_pwm.c @@ -118,7 +118,7 @@ rt_err_t rt_device_pwm_register(struct rt_device_pwm *device, const char *name, device->parent.control = _pwm_control; #endif /* RT_USING_DEVICE_OPS */ - device->parent.type = RT_Device_Class_Miscellaneous; + device->parent.type = RT_Device_Class_PWM; device->ops = ops; device->parent.user_data = (void *)user_data; |
