4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-01-23 04:17:23 +08:00
flyingcys 1ef2afbc93 bsp: cvitek: re-wrote spi driver
Rewrote the spi driver.

Reuse the driver code from https://github.com/sophgo/cvi_alios_open,
which is Apache 2.0 licenced.

Signed-off-by: flyingcys <flyingcys@163.com>
Reviewed-by: Chen Wang <unicorn_wang@outlook.com>
2024-07-17 11:52:27 +08:00

29 lines
848 B
C

/*
* Copyright (c) 2006-2024, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2024-03-28 qiujingbao first version
* 2024/06/08 flyingcys fix transmission failure
*/
#ifndef __DRV_SPI_H__
#define __DRV_SPI_H__
#include "mmio.h"
#include "dw_spi.h"
#define DW_SPI_REG_SIZE (0x10000UL)
#define DW_SPI0_BASE (0x04180000UL)
#define DW_SPI1_BASE (DW_SPI0_BASE + 1 * DW_SPI_REG_SIZE)
#define DW_SPI2_BASE (DW_SPI0_BASE + 2 * DW_SPI_REG_SIZE)
#define DW_SPI3_BASE (DW_SPI0_BASE + 3 * DW_SPI_REG_SIZE)
#define DW_SPI0_IRQn 54
#define DW_SPI1_IRQn 55
#define DW_SPI2_IRQn 56
#define DW_SPI3_IRQn 56
#endif /* __DRV_SPI_H__ */