summaryrefslogtreecommitdiff
path: root/components/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'components/drivers')
-rw-r--r--components/drivers/audio/dev_audio.c (renamed from components/drivers/audio/audio.c)0
-rw-r--r--components/drivers/audio/dev_audio_pipe.c (renamed from components/drivers/audio/audio_pipe.c)2
-rw-r--r--components/drivers/audio/dev_audio_pipe.h (renamed from components/drivers/audio/audio_pipe.h)6
-rw-r--r--components/drivers/can/dev_can.c (renamed from components/drivers/can/can.c)0
-rw-r--r--components/drivers/i2c/SConscript10
-rw-r--r--components/drivers/i2c/dev_i2c_bit_ops.c (renamed from components/drivers/i2c/i2c-bit-ops.c)0
-rw-r--r--components/drivers/i2c/dev_i2c_bus.c (renamed from components/drivers/i2c/i2c_bus.c)2
-rw-r--r--components/drivers/i2c/dev_i2c_core.c (renamed from components/drivers/i2c/i2c_core.c)0
-rw-r--r--components/drivers/i2c/dev_i2c_dev.c (renamed from components/drivers/i2c/i2c_dev.c)0
-rw-r--r--components/drivers/i2c/dev_i2c_dm.c (renamed from components/drivers/i2c/i2c_dm.c)2
-rw-r--r--components/drivers/i2c/dev_soft_i2c.c (renamed from components/drivers/i2c/soft_i2c.c)0
-rw-r--r--components/drivers/include/drivers/dev_alarm.h (renamed from components/drivers/include/drivers/alarm.h)6
-rw-r--r--components/drivers/include/drivers/dev_audio.h (renamed from components/drivers/include/drivers/audio.h)8
-rw-r--r--components/drivers/include/drivers/dev_can.h (renamed from components/drivers/include/drivers/can.h)6
-rw-r--r--components/drivers/include/drivers/dev_i2c.h (renamed from components/drivers/include/drivers/i2c.h)23
-rw-r--r--components/drivers/include/drivers/dev_i2c_bit_ops.h (renamed from components/drivers/include/drivers/i2c-bit-ops.h)4
-rw-r--r--components/drivers/include/drivers/dev_i2c_dm.h (renamed from components/drivers/include/drivers/i2c_dm.h)6
-rw-r--r--components/drivers/include/drivers/dev_pin.h (renamed from components/drivers/include/drivers/pin.h)4
-rw-r--r--components/drivers/include/drivers/dev_pwm.h (renamed from components/drivers/include/drivers/rt_drv_pwm.h)6
-rw-r--r--components/drivers/include/drivers/dev_rtc.h (renamed from components/drivers/include/drivers/rtc.h)6
-rw-r--r--components/drivers/include/drivers/i2c_dev.h44
-rw-r--r--components/drivers/include/drivers/sensor.h2
-rw-r--r--components/drivers/include/drivers/sensor_v2.h2
-rw-r--r--components/drivers/include/drivers/spi.h2
-rw-r--r--components/drivers/include/drivers/touch.h2
-rw-r--r--components/drivers/include/rtdevice.h19
-rwxr-xr-xcomponents/drivers/pin/SConscript6
-rw-r--r--components/drivers/pin/dev_pin.c (renamed from components/drivers/pin/pin.c)2
-rw-r--r--components/drivers/pin/dev_pin_dm.c (renamed from components/drivers/pin/pin_dm.c)2
-rw-r--r--components/drivers/pin/dev_pin_dm.h (renamed from components/drivers/pin/pin_dm.h)2
-rw-r--r--components/drivers/pin/dev_pin_ofw.c (renamed from components/drivers/pin/pin_ofw.c)2
-rw-r--r--components/drivers/rtc/SConscript6
-rw-r--r--components/drivers/rtc/dev_alarm.c (renamed from components/drivers/rtc/alarm.c)0
-rw-r--r--components/drivers/rtc/dev_rtc.c (renamed from components/drivers/rtc/rtc.c)2
-rw-r--r--components/drivers/rtc/dev_soft_rtc.c (renamed from components/drivers/rtc/soft_rtc.c)0
35 files changed, 79 insertions, 105 deletions
diff --git a/components/drivers/audio/audio.c b/components/drivers/audio/dev_audio.c
index 22ee81e51f..22ee81e51f 100644
--- a/components/drivers/audio/audio.c
+++ b/components/drivers/audio/dev_audio.c
diff --git a/components/drivers/audio/audio_pipe.c b/components/drivers/audio/dev_audio_pipe.c
index d4d24b844d..2f5e9df12e 100644
--- a/components/drivers/audio/audio_pipe.c
+++ b/components/drivers/audio/dev_audio_pipe.c
@@ -10,7 +10,7 @@
#include <rthw.h>
#include <rtdevice.h>
-#include "audio_pipe.h"
+#include "dev_audio_pipe.h"
static void _rt_pipe_resume_writer(struct rt_audio_pipe *pipe)
{
diff --git a/components/drivers/audio/audio_pipe.h b/components/drivers/audio/dev_audio_pipe.h
index 88cbecaa22..f22fd14a1f 100644
--- a/components/drivers/audio/audio_pipe.h
+++ b/components/drivers/audio/dev_audio_pipe.h
@@ -6,8 +6,8 @@
* Change Logs:
* Date Author Notes
*/
-#ifndef __AUDIO_PIPE_H__
-#define __AUDIO_PIPE_H__
+#ifndef __DEV_AUDIO_PIPE_H__
+#define __DEV_AUDIO_PIPE_H__
/**
* Pipe Device
@@ -72,4 +72,4 @@ rt_err_t rt_audio_pipe_create(const char *name, rt_int32_t flag, rt_size_t size)
void rt_audio_pipe_destroy(struct rt_audio_pipe *pipe);
#endif /* RT_USING_HEAP */
-#endif /* __AUDIO_PIPE_H__ */
+#endif /* __DEV_AUDIO_PIPE_H__ */
diff --git a/components/drivers/can/can.c b/components/drivers/can/dev_can.c
index f10e05dc55..f10e05dc55 100644
--- a/components/drivers/can/can.c
+++ b/components/drivers/can/dev_can.c
diff --git a/components/drivers/i2c/SConscript b/components/drivers/i2c/SConscript
index 3685e44e2d..269c6f54ba 100644
--- a/components/drivers/i2c/SConscript
+++ b/components/drivers/i2c/SConscript
@@ -3,16 +3,16 @@ from building import *
cwd = GetCurrentDir()
src = Split("""
-i2c_core.c
-i2c_dev.c
+dev_i2c_core.c
+dev_i2c_dev.c
""")
if GetDepend('RT_USING_I2C_BITOPS'):
- src = src + ['i2c-bit-ops.c']
+ src = src + ['dev_i2c_bit_ops.c']
if GetDepend('RT_USING_SOFT_I2C'):
- src = src + ['soft_i2c.c']
+ src = src + ['dev_soft_i2c.c']
if GetDepend(['RT_USING_DM']):
- src += ['i2c_bus.c', 'i2c_dm.c']
+ src += ['dev_i2c_bus.c', 'dev_i2c_dm.c']
# The set of source files associated with this SConscript file.
path = [cwd + '/../include']
diff --git a/components/drivers/i2c/i2c-bit-ops.c b/components/drivers/i2c/dev_i2c_bit_ops.c
index 005cf9035e..005cf9035e 100644
--- a/components/drivers/i2c/i2c-bit-ops.c
+++ b/components/drivers/i2c/dev_i2c_bit_ops.c
diff --git a/components/drivers/i2c/i2c_bus.c b/components/drivers/i2c/dev_i2c_bus.c
index e9626cadd7..8a52471504 100644
--- a/components/drivers/i2c/i2c_bus.c
+++ b/components/drivers/i2c/dev_i2c_bus.c
@@ -10,7 +10,7 @@
#include <rtdevice.h>
-#define DBG_TAG "i2c.bus"
+#define DBG_TAG "dev.i2c.bus"
#define DBG_LVL DBG_INFO
#include <rtdbg.h>
diff --git a/components/drivers/i2c/i2c_core.c b/components/drivers/i2c/dev_i2c_core.c
index 2b8e58c90c..2b8e58c90c 100644
--- a/components/drivers/i2c/i2c_core.c
+++ b/components/drivers/i2c/dev_i2c_core.c
diff --git a/components/drivers/i2c/i2c_dev.c b/components/drivers/i2c/dev_i2c_dev.c
index 96110b9e7d..96110b9e7d 100644
--- a/components/drivers/i2c/i2c_dev.c
+++ b/components/drivers/i2c/dev_i2c_dev.c
diff --git a/components/drivers/i2c/i2c_dm.c b/components/drivers/i2c/dev_i2c_dm.c
index 95b1fe63ab..5701dd580b 100644
--- a/components/drivers/i2c/i2c_dm.c
+++ b/components/drivers/i2c/dev_i2c_dm.c
@@ -10,7 +10,7 @@
#include <rtdevice.h>
-#define DBG_TAG "i2c.dm"
+#define DBG_TAG "dev.i2c.dm"
#define DBG_LVL DBG_INFO
#include <rtdbg.h>
diff --git a/components/drivers/i2c/soft_i2c.c b/components/drivers/i2c/dev_soft_i2c.c
index 54c7395121..54c7395121 100644
--- a/components/drivers/i2c/soft_i2c.c
+++ b/components/drivers/i2c/dev_soft_i2c.c
diff --git a/components/drivers/include/drivers/alarm.h b/components/drivers/include/drivers/dev_alarm.h
index 864933d78c..4553569260 100644
--- a/components/drivers/include/drivers/alarm.h
+++ b/components/drivers/include/drivers/dev_alarm.h
@@ -10,8 +10,8 @@
* 2020-10-15 zhangsz add alarm flags hour minute second.
*/
-#ifndef __ALARM_H__
-#define __ALARM_H__
+#ifndef __DEV_ALARM_H__
+#define __DEV_ALARM_H__
#include <sys/time.h>
#include <rtdef.h>
@@ -72,4 +72,4 @@ rt_err_t rt_alarm_start(rt_alarm_t alarm);
rt_err_t rt_alarm_stop(rt_alarm_t alarm);
int rt_alarm_system_init(void);
-#endif /* __ALARM_H__ */
+#endif /* __DEV_ALARM_H__ */
diff --git a/components/drivers/include/drivers/audio.h b/components/drivers/include/drivers/dev_audio.h
index 6d98272556..ef92a935ab 100644
--- a/components/drivers/include/drivers/audio.h
+++ b/components/drivers/include/drivers/dev_audio.h
@@ -10,10 +10,10 @@
*
*/
-#ifndef __AUDIO_H__
-#define __AUDIO_H__
+#ifndef __DEV_AUDIO_H__
+#define __DEV_AUDIO_H__
-#include "audio_pipe.h"
+#include "dev_audio_pipe.h"
/* AUDIO command */
#define _AUDIO_CTL(a) (RT_DEVICE_CTRL_BASE(Sound) + a)
@@ -173,4 +173,4 @@ void rt_audio_rx_done(struct rt_audio_device *audio, rt_uint8_t *pbuf, rt
#define CODEC_VOLUME_MAX (63)
-#endif /* __AUDIO_H__ */
+#endif /* __DEV_AUDIO_H__ */
diff --git a/components/drivers/include/drivers/can.h b/components/drivers/include/drivers/dev_can.h
index 2ce60d8072..9f2d7c0677 100644
--- a/components/drivers/include/drivers/can.h
+++ b/components/drivers/include/drivers/dev_can.h
@@ -10,8 +10,8 @@
* 2022-05-08 hpmicro add CANFD support, fixed typos
*/
-#ifndef CAN_H_
-#define CAN_H_
+#ifndef __DEV_CAN_H_
+#define __DEV_CAN_H_
#include <rtthread.h>
@@ -360,5 +360,5 @@ rt_err_t rt_hw_can_register(struct rt_can_device *can,
const struct rt_can_ops *ops,
void *data);
void rt_hw_can_isr(struct rt_can_device *can, int event);
-#endif /*_CAN_H*/
+#endif /*__DEV_CAN_H*/
diff --git a/components/drivers/include/drivers/i2c.h b/components/drivers/include/drivers/dev_i2c.h
index 0473a1e8dd..1a469eb473 100644
--- a/components/drivers/include/drivers/i2c.h
+++ b/components/drivers/include/drivers/dev_i2c.h
@@ -9,8 +9,8 @@
* 2021-04-20 RiceChen added support for bus control api
*/
-#ifndef __I2C_H__
-#define __I2C_H__
+#ifndef __DEV_I2C_H__
+#define __DEV_I2C_H__
#include <rtthread.h>
@@ -26,6 +26,22 @@ extern "C" {
#define RT_I2C_NO_READ_ACK (1u << 6) /* when I2C reading, we do not ACK */
#define RT_I2C_NO_STOP (1u << 7)
+#define RT_I2C_DEV_CTRL_10BIT (RT_DEVICE_CTRL_BASE(I2CBUS) + 0x01)
+#define RT_I2C_DEV_CTRL_ADDR (RT_DEVICE_CTRL_BASE(I2CBUS) + 0x02)
+#define RT_I2C_DEV_CTRL_TIMEOUT (RT_DEVICE_CTRL_BASE(I2CBUS) + 0x03)
+#define RT_I2C_DEV_CTRL_RW (RT_DEVICE_CTRL_BASE(I2CBUS) + 0x04)
+#define RT_I2C_DEV_CTRL_CLK (RT_DEVICE_CTRL_BASE(I2CBUS) + 0x05)
+#define RT_I2C_DEV_CTRL_UNLOCK (RT_DEVICE_CTRL_BASE(I2CBUS) + 0x06)
+#define RT_I2C_DEV_CTRL_GET_STATE (RT_DEVICE_CTRL_BASE(I2CBUS) + 0x07)
+#define RT_I2C_DEV_CTRL_GET_MODE (RT_DEVICE_CTRL_BASE(I2CBUS) + 0x08)
+#define RT_I2C_DEV_CTRL_GET_ERROR (RT_DEVICE_CTRL_BASE(I2CBUS) + 0x09)
+
+struct rt_i2c_priv_data
+{
+ struct rt_i2c_msg *msgs;
+ rt_size_t number;
+};
+
struct rt_i2c_msg
{
rt_uint16_t addr;
@@ -99,6 +115,9 @@ rt_err_t rt_i2c_device_register(struct rt_i2c_client *client);
#define RT_I2C_DRIVER_EXPORT(driver) RT_DRIVER_EXPORT(driver, i2c, BUILIN)
#endif /* RT_USING_DM */
+rt_err_t rt_i2c_bus_device_device_init(struct rt_i2c_bus_device *bus,
+ const char *name);
+
rt_err_t rt_i2c_bus_device_register(struct rt_i2c_bus_device *bus,
const char *bus_name);
struct rt_i2c_bus_device *rt_i2c_bus_device_find(const char *bus_name);
diff --git a/components/drivers/include/drivers/i2c-bit-ops.h b/components/drivers/include/drivers/dev_i2c_bit_ops.h
index 2b4ea57990..3c28714b92 100644
--- a/components/drivers/include/drivers/i2c-bit-ops.h
+++ b/components/drivers/include/drivers/dev_i2c_bit_ops.h
@@ -8,8 +8,8 @@
* 2012-04-25 weety first version
*/
-#ifndef __I2C_BIT_OPS_H__
-#define __I2C_BIT_OPS_H__
+#ifndef __DEV_I2C_BIT_OPS_H__
+#define __DEV_I2C_BIT_OPS_H__
#ifdef __cplusplus
extern "C" {
diff --git a/components/drivers/include/drivers/i2c_dm.h b/components/drivers/include/drivers/dev_i2c_dm.h
index 4f5b251c60..c59d6e9a82 100644
--- a/components/drivers/include/drivers/i2c_dm.h
+++ b/components/drivers/include/drivers/dev_i2c_dm.h
@@ -8,8 +8,8 @@
* 2022-11-26 GuEe-GUI first version
*/
-#ifndef __I2C_DM_H__
-#define __I2C_DM_H__
+#ifndef __DEV_I2C_DM_H__
+#define __DEV_I2C_DM_H__
#include <rthw.h>
#include <rtthread.h>
@@ -48,4 +48,4 @@ rt_inline rt_err_t i2c_timings_ofw_parse(struct rt_ofw_node *dev_np, struct i2c_
void i2c_bus_scan_clients(struct rt_i2c_bus_device *bus);
-#endif /* __I2C_DM_H__ */
+#endif /* __DEV_I2C_DM_H__ */
diff --git a/components/drivers/include/drivers/pin.h b/components/drivers/include/drivers/dev_pin.h
index 22d4328e16..55289c0b1a 100644
--- a/components/drivers/include/drivers/pin.h
+++ b/components/drivers/include/drivers/dev_pin.h
@@ -9,8 +9,8 @@
* 2017-10-20 ZYH add mode open drain and input pull down
*/
-#ifndef PIN_H__
-#define PIN_H__
+#ifndef DEV_PIN_H__
+#define DEV_PIN_H__
#include <rtthread.h>
diff --git a/components/drivers/include/drivers/rt_drv_pwm.h b/components/drivers/include/drivers/dev_pwm.h
index e9e1707144..98d6cef6d6 100644
--- a/components/drivers/include/drivers/rt_drv_pwm.h
+++ b/components/drivers/include/drivers/dev_pwm.h
@@ -9,8 +9,8 @@
* 2022-09-24 yuqi add phase and dead time configuration
*/
-#ifndef __DRV_PWM_H_INCLUDE__
-#define __DRV_PWM_H_INCLUDE__
+#ifndef __DEV_PWM_H__
+#define __DEV_PWM_H__
#include <rtthread.h>
@@ -63,4 +63,4 @@ rt_err_t rt_pwm_set_pulse(struct rt_device_pwm *device, int channel, rt_uint32_t
rt_err_t rt_pwm_set_dead_time(struct rt_device_pwm *device, int channel, rt_uint32_t dead_time);
rt_err_t rt_pwm_set_phase(struct rt_device_pwm *device, int channel, rt_uint32_t phase);
-#endif /* __DRV_PWM_H_INCLUDE__ */
+#endif /* __DEV_PWM_H__ */
diff --git a/components/drivers/include/drivers/rtc.h b/components/drivers/include/drivers/dev_rtc.h
index cba0ff9149..96658968e5 100644
--- a/components/drivers/include/drivers/rtc.h
+++ b/components/drivers/include/drivers/dev_rtc.h
@@ -11,8 +11,8 @@
* 2022-04-05 tyx add timestamp function
*/
-#ifndef __RTC_H__
-#define __RTC_H__
+#ifndef __DEV_RTC_H__
+#define __DEV_RTC_H__
#include <rtdef.h>
#include <sys/time.h>
@@ -79,4 +79,4 @@ rt_err_t rt_soft_rtc_set_source(const char *name);
}
#endif
-#endif /* __RTC_H__ */
+#endif /* __DEV_RTC_H__ */
diff --git a/components/drivers/include/drivers/i2c_dev.h b/components/drivers/include/drivers/i2c_dev.h
deleted file mode 100644
index 6744fa142d..0000000000
--- a/components/drivers/include/drivers/i2c_dev.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2006-2023, RT-Thread Development Team
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Change Logs:
- * Date Author Notes
- * 2012-04-25 weety first version
- * 2021-04-20 RiceChen added bus clock command
- */
-
-#ifndef __I2C_DEV_H__
-#define __I2C_DEV_H__
-
-#include <rtthread.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define RT_I2C_DEV_CTRL_10BIT (RT_DEVICE_CTRL_BASE(I2CBUS) + 0x01)
-#define RT_I2C_DEV_CTRL_ADDR (RT_DEVICE_CTRL_BASE(I2CBUS) + 0x02)
-#define RT_I2C_DEV_CTRL_TIMEOUT (RT_DEVICE_CTRL_BASE(I2CBUS) + 0x03)
-#define RT_I2C_DEV_CTRL_RW (RT_DEVICE_CTRL_BASE(I2CBUS) + 0x04)
-#define RT_I2C_DEV_CTRL_CLK (RT_DEVICE_CTRL_BASE(I2CBUS) + 0x05)
-#define RT_I2C_DEV_CTRL_UNLOCK (RT_DEVICE_CTRL_BASE(I2CBUS) + 0x06)
-#define RT_I2C_DEV_CTRL_GET_STATE (RT_DEVICE_CTRL_BASE(I2CBUS) + 0x07)
-#define RT_I2C_DEV_CTRL_GET_MODE (RT_DEVICE_CTRL_BASE(I2CBUS) + 0x08)
-#define RT_I2C_DEV_CTRL_GET_ERROR (RT_DEVICE_CTRL_BASE(I2CBUS) + 0x09)
-
-struct rt_i2c_priv_data
-{
- struct rt_i2c_msg *msgs;
- rt_size_t number;
-};
-
-rt_err_t rt_i2c_bus_device_device_init(struct rt_i2c_bus_device *bus,
- const char *name);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/components/drivers/include/drivers/sensor.h b/components/drivers/include/drivers/sensor.h
index 6c8b78e8a5..537266d705 100644
--- a/components/drivers/include/drivers/sensor.h
+++ b/components/drivers/include/drivers/sensor.h
@@ -12,7 +12,7 @@
#define __SENSOR_H__
#include <rtthread.h>
-#include "pin.h"
+#include "dev_pin.h"
#ifdef __cplusplus
extern "C" {
diff --git a/components/drivers/include/drivers/sensor_v2.h b/components/drivers/include/drivers/sensor_v2.h
index d90cef89c7..3cb00cac88 100644
--- a/components/drivers/include/drivers/sensor_v2.h
+++ b/components/drivers/include/drivers/sensor_v2.h
@@ -13,7 +13,7 @@
#define __SENSOR_H__
#include <rtthread.h>
-#include "pin.h"
+#include "dev_pin.h"
#ifdef __cplusplus
extern "C" {
diff --git a/components/drivers/include/drivers/spi.h b/components/drivers/include/drivers/spi.h
index b35c7b30b3..8c0bf0bbe9 100644
--- a/components/drivers/include/drivers/spi.h
+++ b/components/drivers/include/drivers/spi.h
@@ -15,7 +15,7 @@
#include <stdlib.h>
#include <rtthread.h>
-#include <drivers/pin.h>
+#include <drivers/dev_pin.h>
#ifdef __cplusplus
extern "C"{
diff --git a/components/drivers/include/drivers/touch.h b/components/drivers/include/drivers/touch.h
index aa297491dc..edaf0ad230 100644
--- a/components/drivers/include/drivers/touch.h
+++ b/components/drivers/include/drivers/touch.h
@@ -12,7 +12,7 @@
#define __TOUCH_H__
#include <rtthread.h>
-#include "pin.h"
+#include "dev_pin.h"
#ifdef __cplusplus
extern "C" {
diff --git a/components/drivers/include/rtdevice.h b/components/drivers/include/rtdevice.h
index 5b080fced7..caff5284e5 100644
--- a/components/drivers/include/rtdevice.h
+++ b/components/drivers/include/rtdevice.h
@@ -59,9 +59,9 @@ extern "C" {
#endif /* RT_USING_DM */
#ifdef RT_USING_RTC
-#include "drivers/rtc.h"
+#include "drivers/dev_rtc.h"
#ifdef RT_USING_ALARM
-#include "drivers/alarm.h"
+#include "drivers/dev_alarm.h"
#endif
#endif /* RT_USING_RTC */
@@ -94,15 +94,14 @@ extern "C" {
#endif /* RT_USING_SERIAL */
#ifdef RT_USING_I2C
-#include "drivers/i2c.h"
-#include "drivers/i2c_dev.h"
+#include "drivers/dev_i2c.h"
#ifdef RT_USING_I2C_BITOPS
-#include "drivers/i2c-bit-ops.h"
+#include "drivers/dev_i2c_bit_ops.h"
#endif /* RT_USING_I2C_BITOPS */
#ifdef RT_USING_DM
-#include "drivers/i2c_dm.h"
+#include "drivers/dev_i2c_dm.h"
#endif /* RT_USING_DM */
#endif /* RT_USING_I2C */
@@ -123,7 +122,7 @@ extern "C" {
#endif /* RT_USING_WDT */
#ifdef RT_USING_PIN
-#include "drivers/pin.h"
+#include "drivers/dev_pin.h"
#endif /* RT_USING_PIN */
#ifdef RT_USING_SENSOR
@@ -135,7 +134,7 @@ extern "C" {
#endif /* RT_USING_SENSOR */
#ifdef RT_USING_CAN
-#include "drivers/can.h"
+#include "drivers/dev_can.h"
#endif /* RT_USING_CAN */
#ifdef RT_USING_HWTIMER
@@ -143,7 +142,7 @@ extern "C" {
#endif /* RT_USING_HWTIMER */
#ifdef RT_USING_AUDIO
-#include "drivers/audio.h"
+#include "drivers/dev_audio.h"
#endif /* RT_USING_AUDIO */
#ifdef RT_USING_CPUTIME
@@ -159,7 +158,7 @@ extern "C" {
#endif /* RT_USING_DAC */
#ifdef RT_USING_PWM
-#include "drivers/rt_drv_pwm.h"
+#include "drivers/dev_pwm.h"
#endif /* RT_USING_PWM */
#ifdef RT_USING_PM
diff --git a/components/drivers/pin/SConscript b/components/drivers/pin/SConscript
index bdad84827f..69e3b533f3 100755
--- a/components/drivers/pin/SConscript
+++ b/components/drivers/pin/SConscript
@@ -8,13 +8,13 @@ if not GetDepend(['RT_USING_PIN']):
cwd = GetCurrentDir()
CPPPATH = [cwd + '/../include']
-src = ['pin.c']
+src = ['dev_pin.c']
if GetDepend(['RT_USING_DM']):
- src += ['pin_dm.c']
+ src += ['dev_pin_dm.c']
if GetDepend(['RT_USING_OFW']):
- src += ['pin_ofw.c']
+ src += ['dev_pin_ofw.c']
group = DefineGroup('DeviceDrivers', src, depend = [''], CPPPATH = CPPPATH)
diff --git a/components/drivers/pin/pin.c b/components/drivers/pin/dev_pin.c
index 303fb25b27..ddea62ff0e 100644
--- a/components/drivers/pin/pin.c
+++ b/components/drivers/pin/dev_pin.c
@@ -10,7 +10,7 @@
* 2022-04-29 WangQiang add pin operate command in MSH
*/
-#include <drivers/pin.h>
+#include <drivers/dev_pin.h>
static struct rt_device_pin _hw_pin;
static rt_ssize_t _pin_read(rt_device_t dev, rt_off_t pos, void *buffer, rt_size_t size)
diff --git a/components/drivers/pin/pin_dm.c b/components/drivers/pin/dev_pin_dm.c
index 52dd47fd97..d7714c5a75 100644
--- a/components/drivers/pin/pin_dm.c
+++ b/components/drivers/pin/dev_pin_dm.c
@@ -8,7 +8,7 @@
* 2022-11-26 GuEe-GUI first version
*/
-#include "pin_dm.h"
+#include "dev_pin_dm.h"
static void pin_dm_irq_mask(struct rt_pic_irq *pirq)
{
diff --git a/components/drivers/pin/pin_dm.h b/components/drivers/pin/dev_pin_dm.h
index b5146a2795..c85d93ca41 100644
--- a/components/drivers/pin/pin_dm.h
+++ b/components/drivers/pin/dev_pin_dm.h
@@ -18,4 +18,4 @@
rt_err_t pin_pic_handle_isr(struct rt_device_pin *gpio, rt_base_t pin);
rt_err_t pin_pic_init(struct rt_device_pin *gpio);
-#endif /* __PIN_DM_H__ */
+#endif /* __DEV_PIN_DM_H__ */
diff --git a/components/drivers/pin/pin_ofw.c b/components/drivers/pin/dev_pin_ofw.c
index 29d29d4368..d42cd83076 100644
--- a/components/drivers/pin/pin_ofw.c
+++ b/components/drivers/pin/dev_pin_ofw.c
@@ -10,7 +10,7 @@
#include <dt-bindings/pin/pin.h>
-#include "pin_dm.h"
+#include "dev_pin_dm.h"
static const char * const gpio_suffixes[] =
{
diff --git a/components/drivers/rtc/SConscript b/components/drivers/rtc/SConscript
index fe0d5e9db3..f1e180fffe 100644
--- a/components/drivers/rtc/SConscript
+++ b/components/drivers/rtc/SConscript
@@ -7,11 +7,11 @@ CPPPATH = [cwd + '/../include']
group = []
if GetDepend(['RT_USING_RTC']):
- src = src + ['rtc.c']
+ src = src + ['dev_rtc.c']
if GetDepend(['RT_USING_ALARM']):
- src = src + ['alarm.c']
+ src = src + ['dev_alarm.c']
if GetDepend(['RT_USING_SOFT_RTC']):
- src = src + ['soft_rtc.c']
+ src = src + ['dev_soft_rtc.c']
group = DefineGroup('DeviceDrivers', src, depend = ['RT_USING_RTC'], CPPPATH = CPPPATH)
diff --git a/components/drivers/rtc/alarm.c b/components/drivers/rtc/dev_alarm.c
index b78528a04c..b78528a04c 100644
--- a/components/drivers/rtc/alarm.c
+++ b/components/drivers/rtc/dev_alarm.c
diff --git a/components/drivers/rtc/rtc.c b/components/drivers/rtc/dev_rtc.c
index 4f4fbc61b0..f789036628 100644
--- a/components/drivers/rtc/rtc.c
+++ b/components/drivers/rtc/dev_rtc.c
@@ -17,7 +17,7 @@
#include <string.h>
#include <stdlib.h>
#include <rtthread.h>
-#include <drivers/rtc.h>
+#include <drivers/dev_rtc.h>
#ifdef RT_USING_RTC
diff --git a/components/drivers/rtc/soft_rtc.c b/components/drivers/rtc/dev_soft_rtc.c
index 0eab72ebe5..0eab72ebe5 100644
--- a/components/drivers/rtc/soft_rtc.c
+++ b/components/drivers/rtc/dev_soft_rtc.c