PDK Documentation
csirx_ss.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  */
41 /* @} */
56 /* Sequence for configuring Video port/DMA:
57  * 1. Disable VP/DMA
58  * 2. Configure VP/DMA
59  * 3. Enable VP/DMA
60  */
61 #ifndef CSL_CSIRX_SS_H_
62 #define CSL_CSIRX_SS_H_
63 
64 /* ========================================================================== */
65 /* Include Files */
66 /* ========================================================================== */
67 #include <ti/csl/cslr_csirx.h>
68 
69 #ifdef __cplusplus
70 extern "C" {
71 #endif
72 
73 /* ========================================================================== */
74 /* Macros & Typedefs */
75 /* ========================================================================== */
79 #define CSL_CSIRX_PSI_L_THREAD_NUM_MAX ((uint32_t)32U)
80 
81 /* ========================================================================== */
82 /* Structures and Enums */
83 /* ========================================================================== */
87 typedef enum
88 {
94 
98 typedef enum
99 {
107 
111 typedef enum
112 {
123 
127 typedef struct
128 {
129  uint32_t instance;
133  uint32_t inWidth;
135  uint32_t inHeight;
138 
142 typedef struct
143 {
144  uint32_t chNum;
146  uint32_t virtCh;
148  uint32_t dataType;
150  uint32_t pck12CfgEnable;
155  uint32_t dataSizeShift;
159  uint32_t dualPkgEnable;
164  uint32_t yuv422Mode;
168  uint32_t dstTag;
170  uint32_t srcTag;
172  uint32_t psFlags;
174  uint32_t pktType;
177 
182 typedef struct
183 {
184  uint32_t scheme;
186  uint32_t bu;
188  uint32_t function;
190  uint32_t rtlRev;
192  uint32_t major;
194  uint32_t custom;
196  uint32_t minor;
199 /* ========================================================================== */
200 /* Global Variables */
201 /* ========================================================================== */
202 
203 /* None */
204 
205 /* ========================================================================== */
206 /* Function Declarations */
207 /* ========================================================================== */
217 void CSL_csirxGetRevisionId(const CSL_csi_rx_ifRegs *ifRegisters,
218  CSL_CsirxRevisionId *revId);
219 
231 int32_t CSL_csirxEnableVP(CSL_csi_rx_ifRegs *ifRegisters,
232  uint32_t instance,
233  uint32_t enable);
234 
246 int32_t CSL_csirxConfigVP(CSL_csi_rx_ifRegs *ifRegisters,
247  const CSL_CsirxVPConfig* config);
248 
259 void CSL_csirxAssertPixelIfReset(CSL_csi_rx_ifRegs *ifRegisters, uint32_t assert);
271 int32_t CSL_csirxEnableDMA(CSL_csi_rx_ifRegs *ifRegisters,
272  uint32_t threadNum,
273  uint32_t enable);
274 
286 int32_t CSL_csirxConfigDMA(CSL_csi_rx_ifRegs *ifRegisters,
287  const CSL_CsirxDMAConfig* config);
288 
289 #ifdef __cplusplus
290 }
291 
292 #endif /*extern "C" */
293 
294 #endif
295 
int32_t CSL_csirxEnableDMA(CSL_csi_rx_ifRegs *ifRegisters, uint32_t threadNum, uint32_t enable)
This API is used enable/disable DMA.
int32_t CSL_csirxEnableVP(CSL_csi_rx_ifRegs *ifRegisters, uint32_t instance, uint32_t enable)
This API is used enable/disable Video Port.
uint32_t inWidth
Definition: csirx_ss.h:133
#define assert(expr)
Definition: mcasp_osal.h:16
uint32_t psFlags
Definition: csirx_ss.h:172
Structure for PSI-L/DMA configuration for CSI Rx SS.
Definition: csirx_ss.h:142
uint32_t pktType
Definition: csirx_ss.h:174
Definition: csirx_ss.h:102
void CSL_csirxAssertPixelIfReset(CSL_csi_rx_ifRegs *ifRegisters, uint32_t assert)
This API is used assert/de-assert reset for pixel interface.
Structure for accessing Revision ID and Core Release Info. of CSI Rx module.
Definition: csirx_ss.h:182
uint32_t scheme
Definition: csirx_ss.h:184
Definition: csirx_ss.h:117
uint32_t instance
Definition: csirx_ss.h:129
CSL_CsirxDMADataSizeShift
Enum to represent Data Size Shift while unpacking.
Definition: csirx_ss.h:98
void CSL_csirxGetRevisionId(const CSL_csi_rx_ifRegs *ifRegisters, CSL_CsirxRevisionId *revId)
This API is used get the CSI Rx revision ID.
uint32_t srcTag
Definition: csirx_ss.h:170
CSL_CsirxVPInstance
Enum to represent the Video Port Instance.
Definition: csirx_ss.h:87
Definition: cslr_csi_rx_if.h:61
uint32_t inHeight
Definition: csirx_ss.h:135
Definition: csirx_ss.h:113
uint32_t virtCh
Definition: csirx_ss.h:146
Definition: csirx_ss.h:91
uint32_t bu
Definition: csirx_ss.h:186
uint32_t dstTag
Definition: csirx_ss.h:168
uint32_t minor
Definition: csirx_ss.h:196
Definition: csirx_ss.h:115
uint32_t yuv422Mode
Definition: csirx_ss.h:164
uint32_t dataType
Definition: csirx_ss.h:148
uint32_t dualPkgEnable
Definition: csirx_ss.h:159
int32_t CSL_csirxConfigVP(CSL_csi_rx_ifRegs *ifRegisters, const CSL_CsirxVPConfig *config)
This API is used to configure Video Port.
Definition: csirx_ss.h:119
Structure for Video Port configuration for CSI Rx SS.
Definition: csirx_ss.h:127
uint32_t dataSizeShift
Definition: csirx_ss.h:155
CSL_CsirxYUV422Mode
Enum to represent Data Size Shift while unpacking.
Definition: csirx_ss.h:111
#define CSL_CSI_RX_IF_VP1
Definition: cslr_csi_rx_if.h:78
Definition: csirx_ss.h:89
Definition: csirx_ss.h:100
int32_t CSL_csirxConfigDMA(CSL_csi_rx_ifRegs *ifRegisters, const CSL_CsirxDMAConfig *config)
This API is used to configure DMA.
uint32_t custom
Definition: csirx_ss.h:194
uint32_t chNum
Definition: csirx_ss.h:144
uint32_t major
Definition: csirx_ss.h:192
uint32_t pck12CfgEnable
Definition: csirx_ss.h:150
#define CSL_CSI_RX_IF_VP0
Definition: cslr_csi_rx_if.h:77
Definition: csirx_ss.h:104
uint32_t rtlRev
Definition: csirx_ss.h:190