Commit | Line | Data |
---|---|---|
ca3355a9 DH |
1 | /* |
2 | Copyright (c), 2004-2005,2007-2010 Trident Microsystems, Inc. | |
3 | All rights reserved. | |
4 | ||
5 | Redistribution and use in source and binary forms, with or without | |
6 | modification, are permitted provided that the following conditions are met: | |
7 | ||
8 | * Redistributions of source code must retain the above copyright notice, | |
9 | this list of conditions and the following disclaimer. | |
10 | * Redistributions in binary form must reproduce the above copyright notice, | |
11 | this list of conditions and the following disclaimer in the documentation | |
12 | and/or other materials provided with the distribution. | |
13 | * Neither the name of Trident Microsystems nor Hauppauge Computer Works | |
14 | nor the names of its contributors may be used to endorse or promote | |
15 | products derived from this software without specific prior written | |
16 | permission. | |
17 | ||
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | |
19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
21 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE | |
22 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
23 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
24 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
25 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
26 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
27 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
28 | POSSIBILITY OF SUCH DAMAGE. | |
29 | */ | |
30 | ||
38b2df95 DH |
31 | /** |
32 | * \file $Id: bsp_types.h,v 1.5 2009/08/06 12:55:57 carlo Exp $ | |
33 | * | |
34 | * \brief General type definitions for board support packages | |
35 | * | |
36 | * This file contains type definitions that are needed for almost any | |
37 | * board support package. | |
38 | * The definitions are host and project independent. | |
39 | * | |
40 | */ | |
41 | ||
38b2df95 DH |
42 | #ifndef __BSP_TYPES_H__ |
43 | #define __BSP_TYPES_H__ | |
44 | /*------------------------------------------------------------------------- | |
45 | INCLUDES | |
46 | -------------------------------------------------------------------------*/ | |
47 | ||
48 | #ifdef __cplusplus | |
49 | extern "C" { | |
50 | #endif | |
51 | /*------------------------------------------------------------------------- | |
52 | TYPEDEFS | |
53 | -------------------------------------------------------------------------*/ | |
54 | ||
55 | /** | |
56 | * \typedef unsigned char u8_t | |
57 | * \brief type definition of an unsigned 8 bits integer | |
58 | */ | |
443f18d0 | 59 | typedef unsigned char u8_t; |
38b2df95 DH |
60 | /** |
61 | * \typedef char s8_t | |
62 | * \brief type definition of a signed 8 bits integer | |
63 | */ | |
443f18d0 | 64 | typedef char s8_t; |
38b2df95 DH |
65 | /** |
66 | * \typedef unsigned short u16_t *pu16_t | |
67 | * \brief type definition of an unsigned 16 bits integer | |
68 | */ | |
443f18d0 | 69 | typedef unsigned short u16_t; |
38b2df95 DH |
70 | /** |
71 | * \typedef short s16_t | |
72 | * \brief type definition of a signed 16 bits integer | |
73 | */ | |
443f18d0 | 74 | typedef short s16_t; |
38b2df95 DH |
75 | /** |
76 | * \typedef unsigned long u32_t | |
77 | * \brief type definition of an unsigned 32 bits integer | |
78 | */ | |
443f18d0 | 79 | typedef unsigned long u32_t; |
38b2df95 DH |
80 | /** |
81 | * \typedef long s32_t | |
82 | * \brief type definition of a signed 32 bits integer | |
83 | */ | |
443f18d0 | 84 | typedef long s32_t; |
38b2df95 DH |
85 | /* |
86 | * \typedef struct ... u64_t | |
87 | * \brief type definition of an usigned 64 bits integer | |
88 | */ | |
443f18d0 MCC |
89 | typedef struct { |
90 | u32_t MSLW; | |
91 | u32_t LSLW; | |
92 | } u64_t; | |
38b2df95 DH |
93 | /* |
94 | * \typedef struct ... i64_t | |
95 | * \brief type definition of a signed 64 bits integer | |
96 | */ | |
443f18d0 MCC |
97 | typedef struct { |
98 | s32_t MSLW; | |
99 | u32_t LSLW; | |
100 | } s64_t; | |
38b2df95 DH |
101 | |
102 | /** | |
103 | * \typedef u8_t *pu8_t | |
104 | * \brief type definition of pointer to an unsigned 8 bits integer | |
105 | */ | |
443f18d0 | 106 | typedef u8_t *pu8_t; |
38b2df95 DH |
107 | /** |
108 | * \typedef s8_t *ps8_t | |
109 | * \brief type definition of pointer to a signed 8 bits integer | |
110 | */ | |
443f18d0 | 111 | typedef s8_t *ps8_t; |
38b2df95 DH |
112 | /** |
113 | * \typedef u16_t *pu16_t | |
114 | * \brief type definition of pointer to an unsigned 16 bits integer | |
115 | */ | |
443f18d0 | 116 | typedef u16_t *pu16_t; |
38b2df95 DH |
117 | /** |
118 | * \typedef s16_t *ps16_t | |
119 | * \brief type definition of pointer to a signed 16 bits integer | |
120 | */ | |
443f18d0 | 121 | typedef s16_t *ps16_t; |
38b2df95 DH |
122 | /** |
123 | * \typedef u32_t *pu32_t | |
124 | * \brief type definition of pointer to an unsigned 32 bits integer | |
125 | */ | |
443f18d0 | 126 | typedef u32_t *pu32_t; |
38b2df95 DH |
127 | /** |
128 | * \typedef s32_t *ps32_t | |
129 | * \brief type definition of pointer to a signed 32 bits integer | |
130 | */ | |
443f18d0 | 131 | typedef s32_t *ps32_t; |
38b2df95 DH |
132 | /** |
133 | * \typedef u64_t *pu64_t | |
134 | * \brief type definition of pointer to an usigned 64 bits integer | |
135 | */ | |
443f18d0 | 136 | typedef u64_t *pu64_t; |
38b2df95 DH |
137 | /** |
138 | * \typedef s64_t *ps64_t | |
139 | * \brief type definition of pointer to a signed 64 bits integer | |
140 | */ | |
443f18d0 | 141 | typedef s64_t *ps64_t; |
38b2df95 DH |
142 | |
143 | /** | |
144 | * \typedef s32_t DRXFrequency_t | |
145 | * \brief type definition of frequency | |
146 | */ | |
443f18d0 | 147 | typedef s32_t DRXFrequency_t; |
38b2df95 DH |
148 | |
149 | /** | |
150 | * \typedef DRXFrequency_t *pDRXFrequency_t | |
151 | * \brief type definition of a pointer to a frequency | |
152 | */ | |
443f18d0 | 153 | typedef DRXFrequency_t *pDRXFrequency_t; |
38b2df95 DH |
154 | |
155 | /** | |
156 | * \typedef u32_t DRXSymbolrate_t | |
157 | * \brief type definition of symbol rate | |
158 | */ | |
443f18d0 | 159 | typedef u32_t DRXSymbolrate_t; |
38b2df95 DH |
160 | |
161 | /** | |
162 | * \typedef DRXSymbolrate_t *pDRXSymbolrate_t | |
163 | * \brief type definition of a pointer to a symbol rate | |
164 | */ | |
443f18d0 | 165 | typedef DRXSymbolrate_t *pDRXSymbolrate_t; |
38b2df95 DH |
166 | |
167 | /*------------------------------------------------------------------------- | |
168 | DEFINES | |
169 | -------------------------------------------------------------------------*/ | |
170 | /** | |
171 | * \def NULL | |
172 | * \brief Define NULL for target. | |
173 | */ | |
174 | #ifndef NULL | |
175 | #define NULL (0) | |
176 | #endif | |
177 | ||
178 | /*------------------------------------------------------------------------- | |
179 | ENUM | |
180 | -------------------------------------------------------------------------*/ | |
181 | ||
182 | /* | |
183 | * Boolean datatype. Only define if not already defined TRUE or FALSE. | |
184 | */ | |
185 | #if defined (TRUE) || defined (FALSE) | |
443f18d0 | 186 | typedef int Bool_t; |
38b2df95 DH |
187 | #else |
188 | /** | |
189 | * \enum Bool_t | |
190 | * \brief Boolean type | |
191 | */ | |
443f18d0 MCC |
192 | typedef enum { |
193 | FALSE = 0, | |
194 | TRUE | |
195 | } Bool_t; | |
38b2df95 | 196 | #endif |
443f18d0 | 197 | typedef Bool_t *pBool_t; |
38b2df95 DH |
198 | |
199 | /** | |
200 | * \enum DRXStatus_t | |
201 | * \brief Various return statusses | |
202 | */ | |
443f18d0 MCC |
203 | typedef enum { |
204 | DRX_STS_READY = 3, /**< device/service is ready */ | |
205 | DRX_STS_BUSY = 2, /**< device/service is busy */ | |
206 | DRX_STS_OK = 1, /**< everything is OK */ | |
207 | DRX_STS_INVALID_ARG = -1, | |
208 | /**< invalid arguments */ | |
209 | DRX_STS_ERROR = -2, /**< general error */ | |
210 | DRX_STS_FUNC_NOT_AVAILABLE = -3 | |
211 | /**< unavailable functionality */ | |
212 | } DRXStatus_t, *pDRXStatus_t; | |
38b2df95 DH |
213 | |
214 | /*------------------------------------------------------------------------- | |
215 | STRUCTS | |
216 | -------------------------------------------------------------------------*/ | |
217 | ||
218 | /** | |
219 | Exported FUNCTIONS | |
220 | -------------------------------------------------------------------------*/ | |
221 | ||
222 | /*------------------------------------------------------------------------- | |
223 | THE END | |
224 | -------------------------------------------------------------------------*/ | |
225 | #ifdef __cplusplus | |
226 | } | |
227 | #endif | |
443f18d0 | 228 | #endif /* __BSP_TYPES_H__ */ |