1 /*
2  * Copyright (c) 2006-2022, RT-Thread Development Team
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  *
6  * Change Logs:
7  * Date           Author       Notes
8  * 2017-11-02     勤为本       first version
9  */
10 
11 #ifndef LS1C_DRV_SPI_H
12 #define LS1C_DRV_SPI_H
13 
14 
15 #include "../libraries/ls1c_spi.h"
16 
17 
18 struct ls1c_spi
19 {
20     unsigned char SPIx;     // LS1C_SPI_0 or LS1C_SPI_1
21 };
22 
23 
24 struct ls1c_spi_cs
25 {
26     unsigned char cs;       // LS1C_SPI_CS_0, LS1C_SPI_CS_1, LS1C_SPI_CS_2 or LS1C_SPI_CS_3
27 };
28 
29 
30 
31 /*
32  * 初始化并注册龙芯1c的spi总线
33  * @SPI SPI总线,比如LS1C_SPI_0, LS1C_SPI_1
34  * @spi_bus_name 总线名字
35  * @ret
36  */
37 rt_err_t ls1c_spi_bus_register(rt_uint8_t SPI, const char *spi_bus_name);
38 
39 
40 #endif
41 
42