4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-02-21 01:07:18 +08:00

[components][drivers] Update device type definition and command definition

This commit is contained in:
tyx 2022-04-17 22:04:42 +08:00 committed by guo
parent 0dc493d6da
commit e414cb459d
3 changed files with 4 additions and 4 deletions

View File

@ -246,7 +246,7 @@ rt_err_t rt_hwcrypto_register(struct rt_hwcrypto_device *device, const char *nam
#endif
device->parent.user_data = RT_NULL;
device->parent.type = RT_Device_Class_Miscellaneous;
device->parent.type = RT_Device_Class_Security;
/* Register device */
err = rt_device_register(&device->parent, name, RT_DEVICE_FLAG_RDWR);

View File

@ -29,8 +29,8 @@ typedef struct rt_adc_device *rt_adc_device_t;
typedef enum
{
RT_ADC_CMD_ENABLE,
RT_ADC_CMD_DISABLE,
RT_ADC_CMD_ENABLE = RT_DEVICE_CTRL_BASE(ADC) + 1,
RT_ADC_CMD_DISABLE = RT_DEVICE_CTRL_BASE(ADC) + 2,
} rt_adc_cmd_t;
rt_err_t rt_hw_adc_register(rt_adc_device_t adc,const char *name, const struct rt_adc_ops *ops, const void *user_data);

View File

@ -16,7 +16,7 @@
#include "audio_pipe.h"
/* AUDIO command */
#define _AUDIO_CTL(a) (0x10 + a)
#define _AUDIO_CTL(a) (RT_DEVICE_CTRL_BASE(Sound) + a)
#define AUDIO_CTL_GETCAPS _AUDIO_CTL(1)
#define AUDIO_CTL_CONFIGURE _AUDIO_CTL(2)