MCUSW
Spi_Cfg.h
Go to the documentation of this file.
1 /*
2 *
3 * Copyright (c) 2019 Texas Instruments Incorporated
4 *
5 * All rights reserved not granted herein.
6 *
7 * Limited License.
8 *
9 * Texas Instruments Incorporated grants a world-wide, royalty-free, non-exclusive
10 * license under copyrights and patents it now or hereafter owns or controls to make,
11 * have made, use, import, offer to sell and sell ("Utilize") this software subject to the
12 * terms herein. With respect to the foregoing patent license, such license is granted
13 * solely to the extent that any such patent is necessary to Utilize the software alone.
14 * The patent license shall not apply to any combinations which include this software,
15 * other than combinations with devices manufactured by or for TI ("TI Devices").
16 * No hardware patent is licensed hereunder.
17 *
18 * Redistributions must preserve existing copyright notices and reproduce this license
19 * (including the above copyright notice and the disclaimer and (if applicable) source
20 * code license limitations below) in the documentation and/or other materials provided
21 * with the distribution
22 *
23 * Redistribution and use in binary form, without modification, are permitted provided
24 * that the following conditions are met:
25 *
26 * * No reverse engineering, decompilation, or disassembly of this software is
27 * permitted with respect to any software provided in binary form.
28 *
29 * * any redistribution and use are licensed by TI for use only with TI Devices.
30 *
31 * * Nothing shall obligate TI to provide you with source code for the software
32 * licensed and provided to you in object code.
33 *
34 * If software source code is provided to you, modification and redistribution of the
35 * source code are permitted provided that the following conditions are met:
36 *
37 * * any redistribution and use of the source code, including any resulting derivative
38 * works, are licensed by TI for use only with TI Devices.
39 *
40 * * any redistribution and use of any object code compiled from the source code
41 * and any resulting derivative works, are licensed by TI for use only with TI Devices.
42 *
43 * Neither the name of Texas Instruments Incorporated nor the names of its suppliers
44 *
45 * may be used to endorse or promote products derived from this software without
46 * specific prior written permission.
47 *
48 * DISCLAIMER.
49 *
50 * THIS SOFTWARE IS PROVIDED BY TI AND TI'S LICENSORS "AS IS" AND ANY EXPRESS
51 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
52 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
53 * IN NO EVENT SHALL TI AND TI'S LICENSORS BE LIABLE FOR ANY DIRECT, INDIRECT,
54 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
55 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
56 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
57 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
58 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
59 * OF THE POSSIBILITY OF SUCH DAMAGE.
60 *
61 */
62 
70  /*****************************************************************************
71  Project: Spi
72  Date : 2019-06-28 19:05:15
73  This file is generated by EB Tresos
74  Do not modify this file, otherwise the software may behave in unexpected way.
75  ******************************************************************************/
76 
84 #ifndef SPI_CFG_H_
85 #define SPI_CFG_H_
86 
87 /* ========================================================================== */
88 /* Include Files */
89 /* ========================================================================== */
90 #include "Os.h"
91 #include "Dem.h"
92 #include "Det.h"
93 #include "Spi_Cbk.h"
94 
95 #ifdef __cplusplus
96 extern "C" {
97 #endif
98 
104 #define SPI_VARIANT_POST_BUILD (STD_ON)
105 
112 #define SPI_CHANNELBUFFERS (SPI_IB_EB)
113 
115 #define SPI_IB_MAX_LENGTH (64U)
116 
118 #define SPI_DEV_ERROR_DETECT (STD_ON)
119 
121 #define SPI_JOB_LOG (STD_ON)
122 
124 #define SPI_MAX_JOB_LOG (100U)
125 
126 /*
127  * Scalability levels
128  */
130 #define SPI_LEVEL_0 (0U)
131 
132 #define SPI_LEVEL_1 (1U)
133 
134 #define SPI_LEVEL_2 (2U)
135 
137 #define SPI_SUPPORT_CONCURRENT_SYNC_TRANSMIT (STD_OFF)
138 
140 #define SPI_SCALEABILITY (SPI_LEVEL_2)
141 
143 #define SPI_VERSION_INFO_API (STD_ON)
144 
146 #define SPI_HW_STATUS_API (STD_ON)
147 
149 #define SPI_CANCEL_API (STD_ON)
150 
151 /*
152  * All below macros are used for static memory allocation and can be changed to
153  * match the usecase requirements.
154  */
156 #define SPI_MAX_CHANNELS_PER_JOB (1U)
157 
159 #define SPI_MAX_JOBS_PER_SEQ (1U)
160 
162 #define SPI_MAX_CHANNELS (1U)
163 
165 #define SPI_MAX_JOBS (1U)
166 
168 #define SPI_MAX_SEQ (1U)
169 
174 #define SPI_MAX_HW_UNIT (8U)
175 
179 #define SPI_MAX_EXT_DEV (11U)
180 
181 /*
182  All below macros are used for enabling the ISR for a particular hardware.
183  */
184 
187 #define SPI_UNIT_MCU_MCSPI0_ACTIVE (STD_ON)
188 
191 #define SPI_UNIT_MCU_MCSPI1_ACTIVE (STD_ON)
192 
195 #define SPI_UNIT_MCU_MCSPI2_ACTIVE (STD_ON)
196 
199 #define SPI_UNIT_MCSPI0_ACTIVE (STD_ON)
200 
203 #define SPI_UNIT_MCSPI1_ACTIVE (STD_ON)
204 
207 #define SPI_UNIT_MCSPI2_ACTIVE (STD_ON)
208 
211 #define SPI_UNIT_MCSPI3_ACTIVE (STD_ON)
212 
213 
214 
217 #define SPI_UNIT_MCSPI4_ACTIVE (STD_ON)
218 
221 #define SPI_UNIT_MCSPI5_ACTIVE (STD_OFF)
222 
225 #define SPI_UNIT_MCSPI6_ACTIVE (STD_OFF)
226 
229 #define SPI_UNIT_MCSPI7_ACTIVE (STD_OFF)
230 
231 
232 
233 
234 
236 #define SPI_ISR_TYPE (SPI_ISR_CAT1)
237 
239 #define SPI_OS_COUNTER_ID ((CounterType)OsCounter_0)
240 
246 #define SPI_TIMEOUT_DURATION (32000U)
247 
249 #define SPI_REGISTER_READBACK_API (STD_ON)
250 
252 #define SpiConf_SpiChannel_SpiChannel_0 (0U)
253 
255 #define SpiConf_SpiExternalDevice_CS0 (SPI_CS0)
256 
257 
259 #define SpiConf_SpiJob_SpiJob_0 (0U)
260 
262 #define SpiConf_SpiSequence_SpiSequence_0 (0U)
263 
264 
266 #define SpiConf_SpiExternalDevice_HwUnitId0 (CSIB0)
267 
268 #define SpiConf_SpiExternalDevice_HwUnitId1 (CSIB1)
269 
270 #define SpiConf_SpiExternalDevice_HwUnitId2 (CSIB2)
271 
272 #define SpiConf_SpiExternalDevice_HwUnitId3 (CSIB3)
273 
274 #define SpiConf_SpiExternalDevice_HwUnitId4 (CSIB4)
275 
276 #define SpiConf_SpiExternalDevice_HwUnitId5 (CSIB5)
277 
278 #define SpiConf_SpiExternalDevice_HwUnitId6 (CSIB6)
279 
280 #define SpiConf_SpiExternalDevice_HwUnitId7 (CSIB7)
281 
282 
283 
284 
291 #define DemConf_DemEventParameter_SPI_DEM_NO_EVENT (0xFFFFU)
292 #define SPI_DEM_NO_EVENT DemConf_DemEventParameter_SPI_DEM_NO_EVENT
293 
294 #ifndef SPI_E_HARDWARE_ERROR
295 
296 #define SPI_E_HARDWARE_ERROR (DemConf_DemEventParameter_SPI_E_HARDWARE_ERROR)
297 #endif
298 
299 /* @} */
300 
301 /* ========================================================================== */
302 /* Structures and Enums */
303 /* ========================================================================== */
304 
306 extern const struct Spi_ConfigType_s SpiDriver;
307 
308 
310 extern const struct Spi_ChannelConfigType_PC_s Spi_ChannelConfig_PC[SPI_MAX_CHANNELS];
311 
313 extern const struct Spi_JobConfigType_PC_s Spi_JobConfig_PC[SPI_MAX_JOBS];
314 
316 extern const struct Spi_SeqConfigType_PC_s Spi_SeqConfig_PC[SPI_MAX_SEQ];
317 
318 /* ========================================================================== */
319 /* Function Declarations */
320 /* ========================================================================== */
321 
322 /* None */
323 
324 #ifdef __cplusplus
325 }
326 #endif
327 
328 #endif /* #ifndef SPI_CFG_H_ */
329 
330 /* @} */
331 
332 
333 
#define SPI_MAX_JOBS
Maximum jobs across all sequence/hwunit.
Definition: Spi_Cfg.h:165
const struct Spi_ChannelConfigType_PC_s Spi_ChannelConfig_PC[SPI_MAX_CHANNELS]
SPI Channel PC Configuration struct declaration.
#define SPI_MAX_CHANNELS
Maximum channels across all jobs/sequence/hwunit.
Definition: Spi_Cfg.h:162
const struct Spi_ConfigType_s SpiDriver
SPI Configuration struct declaration.
#define SPI_MAX_SEQ
Maximum sequence across all hwunit.
Definition: Spi_Cfg.h:168
const struct Spi_JobConfigType_PC_s Spi_JobConfig_PC[SPI_MAX_JOBS]
SPI Job PC Configuration struct declaration.
const struct Spi_SeqConfigType_PC_s Spi_SeqConfig_PC[SPI_MAX_SEQ]
SPI Sequence PC Configuration struct declaration.