[device] add dev_ prefix for file names

This commit is contained in:
CXSforHPU 2024-08-24 06:15:09 +08:00 committed by GitHub
parent edfc7d6201
commit 416ec66380
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
78 changed files with 127 additions and 153 deletions

View File

@ -11,7 +11,7 @@
#ifdef RT_USING_PWM
#include <drivers/rt_drv_pwm.h>
#include <drivers/dev_pwm.h>
#include "drv_gpio.h"
//#define DRV_DEBUG

View File

@ -9,7 +9,7 @@
* 2021-10-17 AisinoChip remove unused header file
*/
#include "board.h"
#include <drivers/pin.h>
#include <drivers/dev_pin.h>
#define LED_PIN_NUM 1 /* PA1 */

View File

@ -15,7 +15,7 @@
#include <board.h>
#include <rtdbg.h>
#include <rtdevice.h>
#include <drivers/pin.h>
#include <drivers/dev_pin.h>
/* acm32 config class */
struct acm32_soft_i2c_config

View File

@ -11,7 +11,7 @@
#include <rthw.h>
#include <rtthread.h>
#include "board.h"
#include <drivers/pin.h>
#include <drivers/dev_pin.h>
#define LED_PIN_NUM 83 /* PF3 */

View File

@ -14,7 +14,7 @@
#include <board.h>
#ifdef RT_USING_PWM
#include <drivers/rt_drv_pwm.h>
#include <drivers/dev_pwm.h>
#define DBG_TAG "drv.pwm"
#define DBG_LVL DBG_INFO

View File

@ -12,7 +12,7 @@
#define __DRV_HARD_I2C_H__
#include <rtthread.h>
#include <drivers/i2c.h>
#include <drivers/dev_i2c.h>
#include "drv_common.h"
#include "drv_dma.h"

View File

@ -12,7 +12,7 @@
#ifdef RT_USING_PWM
#include "drv_pwm.h"
#include <drivers/rt_drv_pwm.h>
#include <drivers/dev_pwm.h>
//#define DRV_DEBUG
#define LOG_TAG "drv.pwm"

View File

@ -10,7 +10,7 @@
#include <rtthread.h>
#include <stdio.h>
#include <drivers/pin.h>
#include <drivers/dev_pin.h>
#if defined(BOARD_TYPE_MILKV_DUO256M) || defined(BOARD_TYPE_MILKV_DUO256M_SPINOR)
#define LED_PIN "E02" /* Onboard LED pins */

View File

@ -9,7 +9,7 @@
*/
#include <rtthread.h>
#include <drivers/i2c.h>
#include <drivers/dev_i2c.h>
#include <dm36x.h>
/* ----- global defines ----------------------------------------------- */

View File

@ -12,7 +12,7 @@
#include <board.h>
#include "drv_config.h"
#include <drivers/rt_drv_pwm.h>
#include <drivers/dev_pwm.h>
#include <pwm_tmr_config.h>
#if defined(BSP_USING_PWM)

View File

@ -13,7 +13,7 @@
#include <rtthread.h>
#include <rtdevice.h>
#include "rtt_board.h"
#include "drivers/i2c.h"
#include "drivers/dev_i2c.h"
/*!
* @addtogroup sgtl5000

View File

@ -15,7 +15,7 @@
#include <rtthread.h>
#include <rtdevice.h>
#include "rtt_board.h"
#include "drivers/i2c.h"
#include "drivers/dev_i2c.h"
#include "hpm_wm8960_regs.h"
#define WM8960_I2C_ADDR 0x1A

View File

@ -15,7 +15,7 @@
#include <rtthread.h>
#include <rtdevice.h>
#include "rtt_board.h"
#include "drivers/i2c.h"
#include "drivers/dev_i2c.h"
#include "hpm_wm8960_regs.h"
#define WM8960_I2C_ADDR 0x1A

View File

@ -13,7 +13,7 @@
#include <rtdbg.h>
#ifdef BSP_USING_DAO
#include "drivers/audio.h"
#include "drivers/dev_audio.h"
#include "hpm_i2s_drv.h"
#include "hpm_dao_drv.h"
#include "board.h"

View File

@ -26,7 +26,7 @@
#include "hpm_dma_mgr.h"
#include "drv_i2s.h"
#include "drivers/audio.h"
#include "drivers/dev_audio.h"
static rt_ssize_t hpm_i2s_transmit(struct rt_audio_device* audio, const void* writeBuf, void* readBuf, rt_size_t size);

View File

@ -14,7 +14,7 @@
#ifdef BSP_USING_PDM
#include "board.h"
#include "drivers/audio.h"
#include "drivers/dev_audio.h"
#include "hpm_i2s_drv.h"
#include "hpm_pdm_drv.h"
#include "drv_pdm.h"

View File

@ -13,7 +13,7 @@
#include <rtdevice.h>
#include "board.h"
#include "i2c.h"
#include "drivers/dev_i2c.h"
#include "gpiohs.h"
#include "utils.h"
#include "sleep.h"

View File

@ -10,7 +10,7 @@
*/
#include <rtthread.h>
#include <drivers/pin.h>
#include <drivers/dev_pin.h>
#include "ls1c_gpio.h"
#include "ls1c.h"
#include <rthw.h>

View File

@ -9,8 +9,8 @@
*/
#include <rtthread.h>
#include <drivers/i2c.h>
#include <drivers/i2c-bit-ops.h>
#include <drivers/dev_i2c.h>
#include <drivers/dev_i2c_bit_ops.h>
#include "drv_i2c.h"
#include "../libraries/ls1c_gpio.h"
#include "../libraries/ls1c_delay.h"

View File

@ -6,10 +6,10 @@
* Date Author Notes
* 2015-01-20 Bernard the first version
* 2017-10-20 ZYH add mode open drain and input pull down
* 2020-06-01 Du Huanpeng GPIO driver based on <components/drivers/include/drivers/pin.h>
* 2020-06-01 Du Huanpeng GPIO driver based on <components/drivers/include/drivers/dev_pin.h>
*/
#include <rtthread.h>
#include <drivers/pin.h>
#include <drivers/dev_pin.h>
#include <ls2k1000.h>
#include "drv_gpio.h"

View File

@ -23,7 +23,7 @@
#ifdef RT_USING_SPI
#ifdef RT_USING_SPI_GPIOCS
#include <drivers/pin.h>
#include <drivers/dev_pin.h>
#endif
static void spi_init(uint8_t spre_spr, uint8_t copl, uint8_t cpha)

View File

@ -17,7 +17,7 @@
#include <rtthread.h>
#include <rthw.h>
#include <exception.h>
#include <drivers/pin.h>
#include <drivers/dev_pin.h>
#include "ls2k1000.h"
#include "interrupt.h"

View File

@ -10,7 +10,7 @@
*/
#include "drv_i2c.h"
#include "i2c.h"
#include "drivers/dev_i2c.h"
#include <rtdevice.h>
#include <rtthread.h>
#include "board.h"

View File

@ -8,7 +8,7 @@
* 2021-03-15 picospuch Porting for maxiam32660
*/
#include "rtc.h"
#include "drivers/dev_rtc.h"
#include "board.h"
#include <sys/time.h>

View File

@ -12,7 +12,7 @@
#define __PWM_CONFIG_H__
#include <rtthread.h>
#include <drivers/rt_drv_pwm.h>
#include <drivers/dev_pwm.h>
#ifdef __cplusplus
extern "C" {

View File

@ -22,7 +22,7 @@
#include "fsl_pwm.h"
#include "drv_pwm.h"
#include <drv_common.h>
#include <drivers/rt_drv_pwm.h>
#include <drivers/dev_pwm.h>
#define PWM_SRC_CLK_FREQ CLOCK_GetFreq(kCLOCK_IpgClk)
/* PWMPR register value of 0xffff has the same effect as 0xfffe */

View File

@ -17,7 +17,7 @@
#include <drv_log.h>
#include <rtdevice.h>
#include "drivers/audio.h"
#include "drivers/dev_audio.h"
#include "bsp_wm8960.h"
#include "drv_i2c.h"
#include "drv_sai.h"

View File

@ -9,8 +9,8 @@
*/
#include <rtthread.h>
#include <drivers/audio.h>
#include <drivers/i2c.h>
#include <drivers/dev_audio.h>
#include <drivers/dev_i2c.h>
#include "drv_sound_wm8904.h"
/**

View File

@ -21,7 +21,7 @@
#include "fio_mux.h"
#include "fmio_hw.h"
#include "fmio.h"
#include "drivers/i2c.h"
#include "drivers/dev_i2c.h"
#include "fparameters.h"
#ifdef RT_USING_SMART
#include <ioremap.h>

View File

@ -8,7 +8,7 @@
#include <rtthread.h>
#include "rtdevice.h"
#include "drivers/can.h"
#include "drivers/dev_can.h"
#ifdef BSP_USING_CAN0
#define CAN_DEV_NAME "can0" /* CAN 设备名称 */

View File

@ -15,7 +15,7 @@
#ifdef BSP_USING_PWM
#include "drv_config.h"
#include "drv_tim.h"
#include <drivers/rt_drv_pwm.h>
#include <drivers/dev_pwm.h>
//#define DRV_DEBUG
#define LOG_TAG "drv.pwm"

View File

@ -9,7 +9,7 @@
*/
#include "drv_touch.h"
#include "drivers/i2c.h"
#include "drivers/dev_i2c.h"
#ifdef PKG_USING_LITTLEVGL2RTT
#include "littlevgl2rtt.h"

View File

@ -14,7 +14,7 @@
#include <rtdevice.h>
#ifdef RT_USING_ALARM
#include <alarm.h>
#include "drivers/dev_alarm.h"
#endif
struct rt_rtc_device

View File

@ -19,7 +19,7 @@
#if defined(SOC_RISCV_SERIES_CH32V2)
#include "ch32v20x_tim.h"
#endif
#include <drivers/rt_drv_pwm.h>
#include <drivers/dev_pwm.h>
#include <drivers/hwtimer.h>
#include <board.h>

View File

@ -8,7 +8,7 @@
* 2022-07-15 Emuzit first version
*/
#include <rthw.h>
#include <drivers/pin.h>
#include <drivers/dev_pin.h>
#include "ch56x_gpio.h"
#include "isr_sp.h"

View File

@ -8,8 +8,8 @@
* 2022-08-04 Emuzit first version
*/
#include <rthw.h>
#include <drivers/rt_drv_pwm.h>
#include <drivers/pin.h>
#include <drivers/dev_pwm.h>
#include <drivers/dev_pin.h>
#include "ch56x_pwm.h"
#include "ch56x_sys.h"

View File

@ -9,7 +9,7 @@
*/
#include <rthw.h>
#include <drivers/spi.h>
#include <drivers/pin.h>
#include <drivers/dev_pin.h>
#include "ch56x_spi.h"
#include "ch56x_sys.h"

View File

@ -15,7 +15,7 @@
#else
#include <drivers/serial.h>
#endif
#include <drivers/pin.h>
#include <drivers/dev_pin.h>
#include "ch56x_sys.h"
#include "ch56x_uart.h"
#include "isr_sp.h"

View File

@ -15,7 +15,7 @@
#include "ch32v10x.h"
#include <rthw.h>
#include "drivers/pin.h"
#include "drivers/dev_pin.h"
#define CH32V10X_PIN_NUMBERS 64
/* board configuration */

View File

@ -11,7 +11,7 @@
#include "ch32v20x.h"
#include <rtthread.h>
#include <rthw.h>
#include "drivers/pin.h"
#include "drivers/dev_pin.h"
#include <board.h>
#define LED0 rt_pin_get("PA.0")

View File

@ -9,7 +9,7 @@
*/
#include <rtthread.h>
#include <rtdevice.h>
#include <drivers/pin.h>
#include <drivers/dev_pin.h>
#include "board.h"
void main(void)

View File

@ -12,11 +12,11 @@
* 2022-08-04 Emuzit add pwm test
*/
#include <rtthread.h>
#include <drivers/pin.h>
#include <drivers/dev_pin.h>
#include <drivers/watchdog.h>
#include <drivers/hwtimer.h>
#include <drivers/spi.h>
#include <drivers/rt_drv_pwm.h>
#include <drivers/dev_pwm.h>
#include "board.h"
#define PWM_CYCLE_MAX 255

View File

@ -8,7 +8,7 @@
* 2022-07-15 Emuzit first version
*/
#include <rthw.h>
#include <drivers/pin.h>
#include <drivers/dev_pin.h>
#include "board.h"
#include "ch56x_pfic.h"
#include "ch56x_uart.h"

View File

@ -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)
{

View File

@ -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__ */

View File

@ -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']

View File

@ -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>

View File

@ -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>

View File

@ -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__ */

View File

@ -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__ */

View File

@ -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*/

View File

@ -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);

View File

@ -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" {

View File

@ -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__ */

View File

@ -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>

View File

@ -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__ */

View File

@ -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__ */

View File

@ -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

View File

@ -12,7 +12,7 @@
#define __SENSOR_H__
#include <rtthread.h>
#include "pin.h"
#include "dev_pin.h"
#ifdef __cplusplus
extern "C" {

View File

@ -13,7 +13,7 @@
#define __SENSOR_H__
#include <rtthread.h>
#include "pin.h"
#include "dev_pin.h"
#ifdef __cplusplus
extern "C" {

View File

@ -15,7 +15,7 @@
#include <stdlib.h>
#include <rtthread.h>
#include <drivers/pin.h>
#include <drivers/dev_pin.h>
#ifdef __cplusplus
extern "C"{

View File

@ -12,7 +12,7 @@
#define __TOUCH_H__
#include <rtthread.h>
#include "pin.h"
#include "dev_pin.h"
#ifdef __cplusplus
extern "C" {

View File

@ -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

View File

@ -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)

View File

@ -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)

View File

@ -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)
{

View File

@ -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__ */

View File

@ -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[] =
{

View File

@ -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)

View File

@ -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