PSDK QNX API Guide
udma_dru.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) Texas Instruments Incorporated 2018
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  *
11  * Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the
14  * distribution.
15  *
16  * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32 
48 #ifndef UDMA_DRU_H_
49 #define UDMA_DRU_H_
50 
51 /* ========================================================================== */
52 /* Include Files */
53 /* ========================================================================== */
54 
55 /* None */
56 
57 #ifdef __cplusplus
58 extern "C" {
59 #endif
60 
61 /* ========================================================================== */
62 /* Macros & Typedefs */
63 /* ========================================================================== */
64 
73 #define UDMA_UTC_TYPE_DRU (0U)
74 #define UDMA_UTC_TYPE_DRU_VHWA (1U)
75 /* @} */
76 
77 /* ========================================================================== */
78 /* Structure Declarations */
79 /* ========================================================================== */
80 /* None */
81 
82 /* ========================================================================== */
83 /* Function Declarations */
84 /* ========================================================================== */
85 
98 void Udma_chDruSubmitTr(Udma_ChHandle chHandle, const CSL_UdmapTR *tr);
99 
114 uint32_t Udma_druGetNumQueue(Udma_DrvHandle drvHandle, uint32_t utcId);
115 
140 int32_t Udma_druQueueConfig(Udma_DrvHandle drvHandle,
141  uint32_t utcId,
142  uint32_t queueId,
143  const CSL_DruQueueConfig *queueCfg);
144 
159 volatile uint64_t *Udma_druGetTriggerRegAddr(Udma_ChHandle chHandle);
160 
161 /*
162  * Structure Init functions
163  */
170 void UdmaDruQueueConfig_init(CSL_DruQueueConfig *queueCfg);
171 
172 /* ========================================================================== */
173 /* Static Function Definitions */
174 /* ========================================================================== */
175 
176 /* ========================================================================== */
177 /* Internal/Private Structure Declarations */
178 /* ========================================================================== */
179 
180 /* None */
181 
182 #ifdef __cplusplus
183 }
184 #endif
185 
186 #endif /* #ifndef UDMA_DRU_H_ */
187 
188 /* @} */
void Udma_chDruSubmitTr(Udma_ChHandle chHandle, const CSL_UdmapTR *tr)
This API does a direct TR submission to the specified channel and core ID.
volatile uint64_t * Udma_druGetTriggerRegAddr(Udma_ChHandle chHandle)
This API returns the software triggers register address for the DRU channel.
void UdmaDruQueueConfig_init(CSL_DruQueueConfig *queueCfg)
CSL_DruQueueConfig structure init function.
int32_t Udma_druQueueConfig(Udma_DrvHandle drvHandle, uint32_t utcId, uint32_t queueId, const CSL_DruQueueConfig *queueCfg)
This API configures the DRU queue non-real time configurations.
uint32_t Udma_druGetNumQueue(Udma_DrvHandle drvHandle, uint32_t utcId)
This API returns the number of queues present in a DRU.