3 //==========================================================================
4 //####ECOSGPLCOPYRIGHTBEGIN####
5 // -------------------------------------------
6 // This file is part of eCos, the Embedded Configurable Operating System.
7 // Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
9 // eCos is free software; you can redistribute it and/or modify it under
10 // the terms of the GNU General Public License as published by the Free
11 // Software Foundation; either version 2 or (at your option) any later version.
13 // eCos is distributed in the hope that it will be useful, but WITHOUT ANY
14 // WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
18 // You should have received a copy of the GNU General Public License along
19 // with eCos; if not, write to the Free Software Foundation, Inc.,
20 // 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
22 // As a special exception, if other files instantiate templates or use macros
23 // or inline functions from this file, or you compile this file and link it
24 // with other works to produce a work based on this file, this file does not
25 // by itself cause the resulting work to be covered by the GNU General Public
26 // License. However the source code for this file must still be made available
27 // in accordance with section (3) of the GNU General Public License.
29 // This exception does not invalidate any other reasons why a work based on
30 // this file might be covered by the GNU General Public License.
32 // Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
33 // at http://sources.redhat.com/ecos/ecos-license/
34 // -------------------------------------------
35 //####ECOSGPLCOPYRIGHTEND####
36 //==========================================================================
38 /*****************************************************************************
46 Define some simple variable sizes for this platform.
48 Note that these types are useful for making user threads that are
51 *****************************************************************************/
53 // Include some architecture variant specific types.
55 #include <cyg/hal/var_gen_types.h>
57 // Define types to use for specific sized variables. Note that the above
58 // include file could have defined some of these types differently. If the
59 // type is already defined, always use the previous definition.
61 #ifndef _GEN_TYPES_I8_T
62 #define _GEN_TYPES_I8_T char
64 #ifndef _GEN_TYPES_I16_T
65 #define _GEN_TYPES_I16_T short
67 #ifndef _GEN_TYPES_I32_T
68 #define _GEN_TYPES_I32_T int
70 #ifndef _GEN_TYPES_I64_T
71 #define _GEN_TYPES_I64_T long long
73 #ifndef _GEN_TYPES_S8_T
74 #define _GEN_TYPES_S8_T signed _GEN_TYPES_I8_T
76 #ifndef _GEN_TYPES_S16_T
77 #define _GEN_TYPES_S16_T signed _GEN_TYPES_I16_T
79 #ifndef _GEN_TYPES_S32_T
80 #define _GEN_TYPES_S32_T signed _GEN_TYPES_I32_T
82 #ifndef _GEN_TYPES_S64_T
83 #define _GEN_TYPES_S64_T signed _GEN_TYPES_I64_T
85 #ifndef _GEN_TYPES_U8_T
86 #define _GEN_TYPES_U8_T unsigned _GEN_TYPES_I8_T
88 #ifndef _GEN_TYPES_U16_T
89 #define _GEN_TYPES_U16_T unsigned _GEN_TYPES_I16_T
91 #ifndef _GEN_TYPES_U32_T
92 #define _GEN_TYPES_U32_T unsigned _GEN_TYPES_I32_T
94 #ifndef _GEN_TYPES_U64_T
95 #define _GEN_TYPES_U64_T unsigned _GEN_TYPES_I64_T
97 #ifndef _GEN_TYPES_ADDR_T
98 #define _GEN_TYPES_ADDR_T void *
101 typedef _GEN_TYPES_I8_T i8_t;
102 typedef _GEN_TYPES_I16_T i16_t;
103 typedef _GEN_TYPES_I32_T i32_t;
104 typedef _GEN_TYPES_I64_T i64_t;
105 typedef _GEN_TYPES_S8_T s8_t;
106 typedef _GEN_TYPES_S16_T s16_t;
107 typedef _GEN_TYPES_S32_T s32_t;
108 typedef _GEN_TYPES_S64_T s64_t;
109 typedef _GEN_TYPES_U8_T u8_t;
110 typedef _GEN_TYPES_U16_T u16_t;
111 typedef _GEN_TYPES_U32_T u32_t;
112 typedef _GEN_TYPES_U64_T u64_t;
113 typedef _GEN_TYPES_ADDR_T addr_t;
115 // Use int_t and uint_t for fast counter variables. The size of these
116 // types depends on the architecture but it will always be at least 16 bits.
117 // For example, 16-bit numbers are faster on the 68000 but 32-bit numbers are
118 // faster on the mcf5200. If you need to assume the size of the variable use
119 // u16_t or u32_t instead.
121 #ifndef _GEN_TYPES_INT_T
122 #define _GEN_TYPES_INT_T i32_t
124 #ifndef _GEN_TYPES_SINT_T
125 #define _GEN_TYPES_SINT_T s32_t
127 #ifndef _GEN_TYPES_UINT_T
128 #define _GEN_TYPES_UINT_T u32_t
131 typedef _GEN_TYPES_INT_T int_t;
132 typedef _GEN_TYPES_SINT_T sint_t;
133 typedef _GEN_TYPES_UINT_T uint_t;
135 #endif // _GEN_TYPES_H