Skip to content

Commit

Permalink
[components][drivers][spi]重命名spi.h为spi_core.h
Browse files Browse the repository at this point in the history
  • Loading branch information
wdfk-prog committed Jul 2, 2024
1 parent ec70a01 commit 1a6409c
Show file tree
Hide file tree
Showing 31 changed files with 41 additions and 40 deletions.
2 changes: 1 addition & 1 deletion bsp/Infineon/libraries/HAL_Drivers/drv_spi.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#define __DRV_SPI__

#include <rtthread.h>
#include <drivers/spi.h>
#include <drivers/spi_core.h>

#include "drv_gpio.h"

Expand Down
2 changes: 1 addition & 1 deletion bsp/airm2m/air32f103/libraries/rt_drivers/drv_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#include <rtthread.h>
#include <rtdevice.h>
#include <drivers/spi.h>
#include <drivers/spi_core.h>
#include "board.h"
#include "drv_spi.h"

Expand Down
2 changes: 1 addition & 1 deletion bsp/apm32/libraries/Drivers/drv_spi.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#include "board.h"
#include <rtthread.h>
#include <drivers/spi.h>
#include <drivers/spi_core.h>

struct apm32_spi_config
{
Expand Down
2 changes: 1 addition & 1 deletion bsp/at32/libraries/rt_drivers/drv_spi.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#define __DRV_SPI__

#include <rtthread.h>
#include <drivers/spi.h>
#include <drivers/spi_core.h>
#include "drv_common.h"
#include "drv_dma.h"

Expand Down
2 changes: 1 addition & 1 deletion bsp/hk32/libraries/rt_drivers/drv_spi.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#define __DRV_SPI__

#include <rtthread.h>
#include <drivers/spi.h>
#include <drivers/spi_core.h>
#include <hk32f0xx.h>

struct hk32_spi_config
Expand Down
2 changes: 1 addition & 1 deletion bsp/loongson/ls1cdev/drivers/drv_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/

#include <rtthread.h>
#include <drivers/spi.h>
#include <drivers/spi_core.h>
#include <rthw.h>
#include "drv_spi.h"
#include "ls1c_public.h"
Expand Down
2 changes: 1 addition & 1 deletion bsp/loongson/ls1cdev/drivers/touch.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <rtthread.h>
#include <rtdevice.h>
#include <stdbool.h>
#include <drivers/spi.h>
#include <drivers/spi_core.h>
#include "ls1c.h"
#include "ls1c_gpio.h"
#include "ls1c_spi.h"
Expand Down
2 changes: 1 addition & 1 deletion bsp/loongson/ls2kdev/drivers/drv_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <ctype.h>
#include <stdint.h>
#include <rtthread.h>
#include <drivers/spi.h>
#include <drivers/spi_core.h>
#include "drv_spi.h"

#ifdef RT_USING_SPI
Expand Down
2 changes: 1 addition & 1 deletion bsp/raspberry-pi/raspi3-32/driver/drv_spi.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <rtthread.h>
#include <rtdevice.h>

//#include <drivers/spi.h>
//#include <drivers/spi_core.h>
#include "board.h"

#define SPI0_BASE_ADDR (PER_BASE + BCM283X_SPI0_BASE)
Expand Down
2 changes: 1 addition & 1 deletion bsp/raspberry-pi/raspi3-64/driver/drv_spi.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <rtthread.h>
#include <rtdevice.h>

//#include <drivers/spi.h>
//#include <drivers/spi_core.h>
#include "board.h"

#define SPI0_BASE_ADDR (PER_BASE + BCM283X_SPI0_BASE)
Expand Down
2 changes: 1 addition & 1 deletion bsp/simulator/drivers/sst25vfxx_mtd.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#define SST25VFXX_MTD_H

#include <rtthread.h>
#include <drivers/spi.h>
#include <drivers/spi_core.h>

rt_err_t sst25vfxx_mtd_init(const char *spi_device_name, rt_uint32_t block_start, rt_uint32_t block_end);

Expand Down
2 changes: 1 addition & 1 deletion bsp/tm4c123bsp/libraries/Drivers/drv_spi.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <stdint.h>
#include <rtdevice.h>
#include <rthw.h>
#include "drivers/spi.h"
#include "drivers/spi_core.h"

rt_err_t rt_hw_spi_device_attach(const char *bus_name, const char *device_name, uint32_t portindex, uint32_t cs_gpiobase, uint32_t cs_gpio_pin);

Expand Down
2 changes: 1 addition & 1 deletion bsp/wch/arm/Libraries/ch32_drivers/drv_spi_ch32f10x.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#include <rtthread.h>
#include <rtdevice.h>
#include <drivers/spi.h>
#include <drivers/spi_core.h>
#include "board.h"
#include "drv_spi.h"
#include "ch32f10x_spi.h"
Expand Down
2 changes: 1 addition & 1 deletion bsp/wch/arm/Libraries/ch32_drivers/drv_spi_ch32f20x.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#include <rtthread.h>
#include <rtdevice.h>
#include <drivers/spi.h>
#include <drivers/spi_core.h>
#include "board.h"
#include "drv_spi.h"
#include "ch32f20x_spi.h"
Expand Down
2 changes: 1 addition & 1 deletion bsp/wch/risc-v/Libraries/ch56x_drivers/ch56x_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* 2022-07-30 Emuzit first version
*/
#include <rthw.h>
#include <drivers/spi.h>
#include <drivers/spi_core.h>
#include <drivers/pin.h>
#include "ch56x_spi.h"
#include "ch56x_sys.h"
Expand Down
2 changes: 1 addition & 1 deletion bsp/wch/risc-v/ch569w-evt/applications/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <drivers/pin.h>
#include <drivers/watchdog.h>
#include <drivers/hwtimer.h>
#include <drivers/spi.h>
#include <drivers/spi_core.h>
#include <drivers/rt_drv_pwm.h>
#include "board.h"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2006-2023, RT-Thread Development Team
* Copyright (c) 2006-2024, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
Expand All @@ -10,8 +10,8 @@
* 2022-09-01 liYony fix api rt_spi_sendrecv16 about MSB and LSB bug
*/

#ifndef __SPI_H__
#define __SPI_H__
#ifndef __SPI_CORE_H__
#define __SPI_CORE_H__

#include <stdlib.h>
#include <rtthread.h>
Expand Down Expand Up @@ -81,6 +81,7 @@ struct rt_spi_configuration
rt_uint16_t reserved;

rt_uint32_t max_hz;
rt_uint32_t usage_freq;
};

struct rt_spi_ops;
Expand Down
4 changes: 2 additions & 2 deletions components/drivers/include/rtdevice.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2006-2023, RT-Thread Development Team
* Copyright (c) 2006-2024, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
Expand Down Expand Up @@ -66,7 +66,7 @@ extern "C" {
#endif /* RT_USING_RTC */

#ifdef RT_USING_SPI
#include "drivers/spi.h"
#include "drivers/spi_core.h"
#endif /* RT_USING_SPI */

#ifdef RT_USING_MTD_NOR
Expand Down
2 changes: 1 addition & 1 deletion components/drivers/spi/enc28j60.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2006-2023, RT-Thread Development Team
* Copyright (c) 2006-2024, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
Expand Down
4 changes: 2 additions & 2 deletions components/drivers/spi/enc28j60.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2006-2023, RT-Thread Development Team
* Copyright (c) 2006-2024, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
Expand All @@ -12,7 +12,7 @@
#include <stdint.h>

#include <rtthread.h>
#include <drivers/spi.h>
#include <drivers/spi_core.h>
#include <netif/ethernetif.h>

// ENC28J60 Control Registers
Expand Down
4 changes: 2 additions & 2 deletions components/drivers/spi/qspi_core.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2006-2023, RT-Thread Development Team
* Copyright (c) 2006-2024, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
Expand All @@ -8,7 +8,7 @@
* 2018-11-16 zylx first version.
*/

#include <drivers/spi.h>
#include <drivers/spi_core.h>

rt_err_t rt_qspi_configure(struct rt_qspi_device *device, struct rt_qspi_configuration *cfg)
{
Expand Down
2 changes: 1 addition & 1 deletion components/drivers/spi/spi-bit-ops.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2006-2023, RT-Thread Development Team
* Copyright (c) 2006-2024, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
Expand Down
4 changes: 2 additions & 2 deletions components/drivers/spi/spi_core.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2006-2023, RT-Thread Development Team
* Copyright (c) 2006-2024, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
Expand All @@ -13,7 +13,7 @@
* 2012-09-28 aozima fixed rt_spi_release_bus assert error.
*/

#include <drivers/spi.h>
#include <drivers/spi_core.h>

#define DBG_TAG "spi.core"
#define DBG_LVL DBG_INFO
Expand Down
4 changes: 2 additions & 2 deletions components/drivers/spi/spi_dev.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2006-2023, RT-Thread Development Team
* Copyright (c) 2006-2024, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
Expand All @@ -8,7 +8,7 @@
*/

#include <rtthread.h>
#include <drivers/spi.h>
#include <drivers/spi_core.h>

/* SPI bus device interface, compatible with RT-Thread 0.3.x/1.0.x */
static rt_ssize_t _spi_bus_device_read(rt_device_t dev,
Expand Down
2 changes: 1 addition & 1 deletion components/drivers/spi/spi_flash.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2006-2023, RT-Thread Development Team
* Copyright (c) 2006-2024, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
Expand Down
2 changes: 1 addition & 1 deletion components/drivers/spi/spi_flash_sfud.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2006-2023, RT-Thread Development Team
* Copyright (c) 2006-2024, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
Expand Down
2 changes: 1 addition & 1 deletion components/drivers/spi/spi_flash_sfud.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2006-2023, RT-Thread Development Team
* Copyright (c) 2006-2024, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
Expand Down
2 changes: 1 addition & 1 deletion components/drivers/spi/spi_msd.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2006-2023, RT-Thread Development Team
* Copyright (c) 2006-2024, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
Expand Down
4 changes: 2 additions & 2 deletions components/drivers/spi/spi_msd.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2006-2023, RT-Thread Development Team
* Copyright (c) 2006-2024, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
Expand All @@ -13,7 +13,7 @@

#include <stdint.h>
#include <rtdevice.h>
#include <drivers/spi.h>
#include <drivers/spi_core.h>

/* SD command (SPI mode) */
#define GO_IDLE_STATE 0 /* CMD0 R1 */
Expand Down
4 changes: 2 additions & 2 deletions components/drivers/spi/spi_wifi_rw009.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* COPYRIGHT (C) 2011-2023, Real-Thread Information Technology Ltd
* COPYRIGHT (C) 2011-2024, Real-Thread Information Technology Ltd
*
* SPDX-License-Identifier: Apache-2.0
*
Expand All @@ -11,7 +11,7 @@
*/

#include <rtthread.h>
#include <drivers/spi.h>
#include <drivers/spi_core.h>

#include <netif/ethernetif.h>
#include <netif/etharp.h>
Expand Down
2 changes: 1 addition & 1 deletion components/drivers/spi/spi_wifi_rw009.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* COPYRIGHT (C) 2011-2023, Real-Thread Information Technology Ltd
* COPYRIGHT (C) 2011-2024, Real-Thread Information Technology Ltd
*
* SPDX-License-Identifier: Apache-2.0
*
Expand Down

0 comments on commit 1a6409c

Please sign in to comment.