summaryrefslogtreecommitdiff
path: root/components/drivers/include
diff options
context:
space:
mode:
authortyx <[email protected]>2022-04-17 22:04:42 +0800
committerguo <[email protected]>2022-04-18 09:38:56 +0800
commite414cb459d5f0410376ef3fea35809e47df252a3 (patch)
tree5a0a4e8832130531afc6e263d6e74bf7848ff0de /components/drivers/include
parent0dc493d6dab6501a119899fffe2591db367ea64a (diff)
[components][drivers] Update device type definition and command definition
Diffstat (limited to 'components/drivers/include')
-rw-r--r--components/drivers/include/drivers/adc.h4
-rw-r--r--components/drivers/include/drivers/audio.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/components/drivers/include/drivers/adc.h b/components/drivers/include/drivers/adc.h
index e2ce087fb9..2ff4102a3b 100644
--- a/components/drivers/include/drivers/adc.h
+++ b/components/drivers/include/drivers/adc.h
@@ -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);
diff --git a/components/drivers/include/drivers/audio.h b/components/drivers/include/drivers/audio.h
index 45c31be2f3..d9a7388678 100644
--- a/components/drivers/include/drivers/audio.h
+++ b/components/drivers/include/drivers/audio.h
@@ -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)