]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lib.git/blob - rpp/src/drv/_tms570_hydctr/spi_def.c
Change license to MIT
[pes-rpp/rpp-lib.git] / rpp / src / drv / _tms570_hydctr / spi_def.c
1 /*
2  * Copyright (C) 2015 Czech Technical University in Prague
3  *
4  * Authors:
5  *     - Michal Sojka <sojkam1@fel.cvut.cz>
6  *
7  * Permission is hereby granted, free of charge, to any person
8  * obtaining a copy of this software and associated documentation
9  * files (the "Software"), to deal in the Software without
10  * restriction, including without limitation the rights to use,
11  * copy, modify, merge, publish, distribute, sublicense, and/or sell
12  * copies of the Software, and to permit persons to whom the
13  * Software is furnished to do so, subject to the following
14  * conditions:
15  *
16  * The above copyright notice and this permission notice shall be
17  * included in all copies or substantial portions of the Software.
18  *
19  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
21  * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
22  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
23  * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
24  * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
25  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
26  * OTHER DEALINGS IN THE SOFTWARE.
27  *
28  */
29
30 #include "drv/spi_def.h"
31 #include "drv/spi_tms570.h"
32
33 const spi_dev_t spi_devs[_SPIDEV_COUNT] = {
34         [SPIDEV_MCP6S93_TH1] = {
35                 .iface = SPI_IFACE3,
36                 .cs = SPI_CS_4,
37                 .dfsel = 0,
38                 .wdel = 0,
39                 .cshold = 1,
40                 .dlen = 0
41         },
42         [SPIDEV_MCP6S93_TH2] = {
43                 .iface = SPI_IFACE3,
44                 .cs = SPI_CS_5,
45                 .dfsel = 0,
46                 .wdel = 0,
47                 .cshold = 1,
48                 .dlen = 0
49         },
50         [SPIDEV_MCP6S93_6ADC] = {
51                 .iface = SPI_IFACE3,
52                 .cs = SPI_CS_0,
53                 .dfsel = 0,
54                 .wdel = 0,
55                 .cshold = 1,
56                 .dlen = 0
57         },
58         [SPIDEV_TPS65381_PWR] = {
59                 .iface = SPI_IFACE2,
60                 .cs = SPI_CS_1,
61                 .dfsel = 0,
62                 .wdel = 0,
63                 .cshold = 1,
64                 .dlen = 0
65         },
66         [SPIDEV_MCP6S93_SENSUP] = {
67                 .iface = SPI_IFACE5,
68                 .cs = SPI_CS_3,
69                 .dfsel = 0,
70                 .wdel = 0,
71                 .cshold = 1,
72                 .dlen = 0
73         },
74         [SPIDEV_MCP6S93_DAC] = {
75                 .iface = SPI_IFACE5,
76                 .cs = SPI_CS_2,
77                 .dfsel = 0,
78                 .wdel = 0,
79                 .cshold = 1,
80                 .dlen = 0
81         },
82 };