PDK API Guide for J721E
csl_types.h
Go to the documentation of this file.
1 /* ============================================================================
2  * Copyright (c) Texas Instruments Incorporated 2002, 2003, 2004, 2005, 2006, 2008
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 */
33 
40 #ifndef CSL_TYPES_H
41 #define CSL_TYPES_H
42 
43 #include <ti/csl/tistdtypes.h>
44 
53 #ifndef TRUE
54 #define TRUE ((Bool) 1)
55 #define FALSE ((Bool) 0)
56 #endif
57 
58 typedef Int16 CSL_Uid;
59 typedef Int16 CSL_ModuleId;
60 typedef Uint32 CSL_Xio;
61 
62 typedef Uint8 CSL_BitMask8;
63 typedef Uint16 CSL_BitMask16;
64 typedef Uint32 CSL_BitMask32;
65 
66 typedef volatile Uint8 CSL_Reg8;
67 typedef volatile Uint16 CSL_Reg16;
68 typedef volatile Uint32 CSL_Reg32;
69 
70 typedef Int16 CSL_Status;
71 typedef Int16 CSL_InstNum;
72 typedef Int16 CSL_ChaNum;
73 
74 typedef unsigned long long int CSL_Uint64;
75 /* @} */
76 
78 typedef enum {
81 } CSL_OpenMode;
82 
84 typedef int32_t CSL_ErrType_t;
85 
94 #define CSL_PASS ( (int32_t) (0))
95 #define CSL_EFAIL (-(int32_t) (1))
96 #define CSL_EBADARGS (-(int32_t) (2))
97 #define CSL_EINVALID_PARAMS (-(int32_t) (3))
98 #define CSL_ETIMEOUT (-(int32_t) (4))
99 #define CSL_EOUT_OF_RANGE (-(int32_t) (5))
100 #define CSL_EUNSUPPORTED_CMD (-(int32_t) (6))
101 #define CSL_EUNSUPPORTED_OPS (-(int32_t) (7))
102 #define CSL_EALLOC (-(int32_t) (8))
103 /* @} */
104 
106 #ifndef NULL
107 #define NULL ((void*)0)
108 #endif
109 
110 #ifndef NULL_PTR
111 #if defined (HOST_EMULATION)
112 /* Host emulation compilation throws below error when void * is used. So
113  * retain as normal 0 comparision.
114  *
115  * error: invalid conversion from 'void*' to 'xxx *' [-fpermissive]
116  */
117 #define NULL_PTR (NULL)
118 #else
119 #define NULL_PTR ((void *)0)
120 #endif
121 #endif
122 
123 
132 #define STW_SOK (CSL_PASS)
133 #define STW_EFAIL (CSL_EFAIL)
134 #define STW_EBADARGS (CSL_EBADARGS)
135 #define STW_EINVALID_PARAMS (CSL_EINVALID_PARAMS)
136 #define STW_ETIMEOUT (CSL_ETIMEOUT)
137 #define STW_EOUT_OF_RANGE (CSL_EOUT_OF_RANGE)
138 #define STW_EUNSUPPORTED_CMD (CSL_EUNSUPPORTED_CMD)
139 #define STW_EUNSUPPORTED_OPS (CSL_EUNSUPPORTED_OPS)
140 /* @} */
141 
142 #endif /* CSL_TYPES_H */
143 
Uint16 CSL_BitMask16
Definition: csl_types.h:63
unsigned long long int CSL_Uint64
Definition: csl_types.h:74
int32_t CSL_ErrType_t
CSL error type.
Definition: csl_types.h:84
volatile Uint16 CSL_Reg16
Definition: csl_types.h:67
Int16 CSL_ModuleId
Definition: csl_types.h:59
Uint32 CSL_Xio
Definition: csl_types.h:60
volatile Uint8 CSL_Reg8
Definition: csl_types.h:66
Int16 CSL_Uid
Definition: csl_types.h:58
Definition: csl_types.h:79
volatile Uint32 CSL_Reg32
Definition: csl_types.h:68
Definition: csl_types.h:80
Uint32 CSL_BitMask32
Definition: csl_types.h:64
Int16 CSL_InstNum
Definition: csl_types.h:71
Uint8 CSL_BitMask8
Definition: csl_types.h:62
Int16 CSL_ChaNum
Definition: csl_types.h:72
Int16 CSL_Status
Definition: csl_types.h:70
CSL_OpenMode
CSL open mode.
Definition: csl_types.h:78