]> git.kernelconcepts.de Git - karo-tx-redboot.git/blob - packages/hal/m68k/arch/v2_0/include/gen_types.h
Initial revision
[karo-tx-redboot.git] / packages / hal / m68k / arch / v2_0 / include / gen_types.h
1 #ifndef _GEN_TYPES_H
2 #define _GEN_TYPES_H
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.
8 //
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.
12 //
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
16 // for more details.
17 //
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.
21 //
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.
28 //
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.
31 //
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 //==========================================================================
37
38 /*****************************************************************************
39
40                               *********************
41                               *                   *
42                               *   General Types   *
43                               *                   *
44                               *********************
45
46      Define some simple variable sizes for this platform.
47
48      Note that these types are useful  for making user threads that  are
49 not eCos-specific.
50
51 *****************************************************************************/
52
53 //      Include some architecture variant specific types.
54
55 #include <cyg/hal/var_gen_types.h>
56
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.
60
61 #ifndef _GEN_TYPES_I8_T
62 #define _GEN_TYPES_I8_T char
63 #endif
64 #ifndef _GEN_TYPES_I16_T
65 #define _GEN_TYPES_I16_T short
66 #endif
67 #ifndef _GEN_TYPES_I32_T
68 #define _GEN_TYPES_I32_T int
69 #endif
70 #ifndef _GEN_TYPES_I64_T
71 #define _GEN_TYPES_I64_T long long
72 #endif
73 #ifndef _GEN_TYPES_S8_T
74 #define _GEN_TYPES_S8_T signed _GEN_TYPES_I8_T
75 #endif
76 #ifndef _GEN_TYPES_S16_T
77 #define _GEN_TYPES_S16_T signed _GEN_TYPES_I16_T
78 #endif
79 #ifndef _GEN_TYPES_S32_T
80 #define _GEN_TYPES_S32_T signed _GEN_TYPES_I32_T
81 #endif
82 #ifndef _GEN_TYPES_S64_T
83 #define _GEN_TYPES_S64_T signed _GEN_TYPES_I64_T
84 #endif
85 #ifndef _GEN_TYPES_U8_T
86 #define _GEN_TYPES_U8_T unsigned _GEN_TYPES_I8_T
87 #endif
88 #ifndef _GEN_TYPES_U16_T
89 #define _GEN_TYPES_U16_T unsigned _GEN_TYPES_I16_T
90 #endif
91 #ifndef _GEN_TYPES_U32_T
92 #define _GEN_TYPES_U32_T unsigned _GEN_TYPES_I32_T
93 #endif
94 #ifndef _GEN_TYPES_U64_T
95 #define _GEN_TYPES_U64_T unsigned _GEN_TYPES_I64_T
96 #endif
97 #ifndef _GEN_TYPES_ADDR_T
98 #define _GEN_TYPES_ADDR_T void *
99 #endif
100
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;
114
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.
120
121 #ifndef _GEN_TYPES_INT_T
122 #define _GEN_TYPES_INT_T i32_t
123 #endif
124 #ifndef _GEN_TYPES_SINT_T
125 #define _GEN_TYPES_SINT_T s32_t
126 #endif
127 #ifndef _GEN_TYPES_UINT_T
128 #define _GEN_TYPES_UINT_T u32_t
129 #endif
130
131 typedef _GEN_TYPES_INT_T  int_t;
132 typedef _GEN_TYPES_SINT_T sint_t;
133 typedef _GEN_TYPES_UINT_T uint_t;
134
135 #endif // _GEN_TYPES_H
136