1 /*
2 * tistdtypes.h
3 *
4 * Header file defining various data types.
5 *
6 * Copyright (C) 2009 Texas Instruments Incorporated - http://www.ti.com/
7 *
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
11 * are met:
12 *
13 * Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 *
16 * Redistributions in binary form must reproduce the above copyright
17 * notice, this list of conditions and the following disclaimer in the
18 * documentation and/or other materials provided with the
19 * distribution.
20 *
21 * Neither the name of Texas Instruments Incorporated nor the names of
22 * its contributors may be used to endorse or promote products derived
23 * from this software without specific prior written permission.
24 *
25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
28 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
29 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
30 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
31 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 *
37 */
39 /*
40 * These types are also defined by other TI components. They are bracketed
41 * with _TI_STD_TYPES to avoid warnings for duplicate definition.
42 *
43 * You may get warnings about duplicate type definitions when using this
44 * header file with earlier versions of DSP/BIOS and CSL.
45 *
46 * You can use the '-pds303' compiler option to suppress these warnings.
47 */
48 #ifndef _TI_STD_TYPES
49 #define _TI_STD_TYPES
51 /*
52 * This '#ifndef STD_' is needed to protect from duplicate definitions
53 * of Int, Uns, etc. in DSP/BIOS v4.x (e.g. 4.90, 4.80) since these versions
54 * of DSP/BIOS did not contain the '#ifndef_TI_STD_TYPES' logic.
55 */
56 #ifndef STD_
58 /*
59 * Aliases for standard C types
60 */
61 typedef int Int;
62 typedef unsigned Uns;
63 typedef char Char;
65 /* pointer to null-terminated character sequence */
66 typedef char *String;
68 typedef void *Ptr; /* pointer to arbitrary type */
70 typedef unsigned short Bool; /* boolean */
72 #endif /* STD_ */
74 /*
75 * Uint8, Uint16, Uint32, etc are defined to be "smallest unit of
76 * available storage that is large enough to hold unsigned or integer
77 * of specified size".
78 */
80 /* Handle the 6x ISA */
81 #if defined(_TMS320C6X)
82 /* Unsigned integer definitions (32bit, 16bit, 8bit) follow... */
83 typedef unsigned int Uint32;
84 typedef unsigned short Uint16;
85 typedef unsigned char Uint8;
87 /* Signed integer definitions (32bit, 16bit, 8bit) follow... */
88 typedef int Int32;
89 typedef short Int16;
90 typedef char Int8;
92 /* Handle the 54x, 55x and 28x ISAs */
93 #elif defined(_TMS320C5XX) || defined(__TMS320C55X__) || defined(_TMS320C28X)
94 /* Unsigned integer definitions (32bit, 16bit, 8bit) follow... */
95 typedef unsigned long Uint32;
96 typedef unsigned short Uint16;
97 typedef unsigned char Uint8;
99 /* Signed integer definitions (32bit, 16bit, 8bit) follow... */
100 typedef long Int32;
101 typedef short Int16;
102 typedef char Int8;
104 #else
105 /* Other ISAs not supported */
106 #error <tistdtypes.h> is not supported for this target
107 #endif /* defined(_6x_) */
109 #endif /* _TI_STD_TYPES */