2020-07-01 23:44:57 +08:00
|
|
|
/*
|
2021-03-21 22:23:24 +08:00
|
|
|
* Copyright (c) 2006-2021, RT-Thread Development Team
|
2020-07-01 23:44:57 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*
|
|
|
|
* Change Logs:
|
|
|
|
* Date Author Notes
|
|
|
|
* 2020-06-27 AHTYDHD the first version
|
|
|
|
*/
|
|
|
|
|
2020-06-24 19:54:42 +08:00
|
|
|
#ifndef __SPI_CONFIG_H__
|
|
|
|
#define __SPI_CONFIG_H__
|
|
|
|
|
|
|
|
#include <rtthread.h>
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef BSP_USING_SPI0
|
|
|
|
#ifndef SPI0_BUS_CONFIG
|
|
|
|
#define SPI0_BUS_CONFIG \
|
|
|
|
{ \
|
2020-07-02 14:43:10 +08:00
|
|
|
.base = SSI0_BASE, \
|
2020-06-24 19:54:42 +08:00
|
|
|
.bus_name = "spi0", \
|
|
|
|
}
|
|
|
|
#endif /* SPI0_BUS_CONFIG */
|
|
|
|
#endif /* BSP_USING_SPI0 */
|
|
|
|
|
|
|
|
#ifdef BSP_USING_SPI1
|
|
|
|
#ifndef SPI1_BUS_CONFIG
|
|
|
|
#define SPI1_BUS_CONFIG \
|
|
|
|
{ \
|
2020-07-02 14:43:10 +08:00
|
|
|
.base = SSI1_BASE, \
|
2020-06-24 19:54:42 +08:00
|
|
|
.bus_name = "spi1", \
|
|
|
|
}
|
|
|
|
#endif /* SPI1_BUS_CONFIG */
|
|
|
|
#endif /* BSP_USING_SPI1 */
|
2020-07-02 14:43:10 +08:00
|
|
|
|
2020-06-24 19:54:42 +08:00
|
|
|
#ifdef BSP_USING_SPI2
|
|
|
|
#ifndef SPI2_BUS_CONFIG
|
|
|
|
#define SPI2_BUS_CONFIG \
|
|
|
|
{ \
|
2020-07-02 14:43:10 +08:00
|
|
|
.base = SSI2_BASE, \
|
2020-06-24 19:54:42 +08:00
|
|
|
.bus_name = "spi2", \
|
|
|
|
}
|
|
|
|
#endif /* SPI2_BUS_CONFIG */
|
|
|
|
#endif /* BSP_USING_SPI2 */
|
2020-07-02 14:43:10 +08:00
|
|
|
|
2020-06-24 19:54:42 +08:00
|
|
|
#ifdef BSP_USING_SPI3
|
|
|
|
#ifndef SPI3_BUS_CONFIG
|
|
|
|
#define SPI3_BUS_CONFIG \
|
|
|
|
{ \
|
2020-07-02 14:43:10 +08:00
|
|
|
.base = SSI3_BASE, \
|
2020-06-24 19:54:42 +08:00
|
|
|
.bus_name = "spi3", \
|
|
|
|
}
|
|
|
|
#endif /* SPI3_BUS_CONFIG */
|
|
|
|
#endif /* BSP_USING_SPI3 */
|
2020-07-02 14:43:10 +08:00
|
|
|
|
2020-06-24 19:54:42 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /*__SPI_CONFIG_H__ */
|
2020-07-01 23:44:57 +08:00
|
|
|
|
2021-03-21 22:23:24 +08:00
|
|
|
/************************** end of file ******************/
|