OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [freertos-6.1.1/] [Demo/] [SuperH_SH7216_Renesas/] [RTOSDemo/] [RenesasCode/] [types.h] - Blame information for rev 585

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 585 jeremybenn
/******************************************************************************
2
* File Name    : types.h
3
* Version      : 1.0
4
* Device(s)    : Renesas
5
* Tool-Chain   : Renesas SH2A V9+
6
* OS           : None
7
* H/W Platform : SH2A
8
* Description  : User Defined Type Definition File
9
*******************************************************************************
10
* History      : DD.MM.YYYY Ver. Description
11
*              : 01.08.2009 1.00 MAB First Release
12
******************************************************************************/
13
 
14
/******************************************************************************
15
* DISCLAIMER
16
* This software is supplied by Renesas Technology Corp. and is only
17
* intended for use with Renesas products. No other uses are authorized.
18
* This software is owned by Renesas Technology Corp. and is protected under
19
* all applicable laws, including copyright laws.
20
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES
21
* REGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY,
22
* INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
23
* PARTICULAR PURPOSE AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY
24
* DISCLAIMED.
25
* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
26
* TECHNOLOGY CORP. NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
27
* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
28
* FOR ANY REASON RELATED TO THE THIS SOFTWARE, EVEN IF RENESAS OR ITS
29
* AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
30
* Renesas reserves the right, without notice, to make changes to this
31
* software and to discontinue the availability of this software.
32
* By using this software, you agree to the additional terms and
33
* conditions found by accessing the following link:
34
* http://www.renesas.com/disclaimer
35
******************************************************************************/
36
/* Copyright (C) 2008. Renesas Technology Corp.,       All Rights Reserved.  */
37
/* Copyright (C) 2009. Renesas Technology Europe Ltd., All Rights Reserved.  */
38
/*****************************************************************************/
39
 
40
#ifndef TYPES_H_INCLUDED
41
#define TYPES_H_INCLUDED
42
 
43
/******************************************************************************
44
User Includes
45
******************************************************************************/
46
 
47
#include "Compiler.h"
48
 
49
/******************************************************************************
50
Function Macros
51
******************************************************************************/
52
 
53
#ifndef SWAPWORD
54
#define SWAPWORD(x)           (WORD)((((x) & 0xFF) << 8) | (((x) >> 8) & 0xFF))
55
#endif
56
 
57
#ifndef LOBYTE
58
#define LOBYTE(x)             (BYTE)(x)
59
#endif
60
 
61
#ifndef HIBYTE
62
#define HIBYTE(x)             (BYTE)((x) >> 8)
63
#endif
64
 
65
#ifndef MAKEWORD
66
#define MAKEWORD(a, b)        ((WORD) (((BYTE) (a)) |\
67
                              ((WORD) ((BYTE) (b))) << 8))
68
#endif
69
 
70
/******************************************************************************
71
Typedefs
72
******************************************************************************/
73
 
74
/* Generic definitions */
75
#ifndef NULL                        /* set null ((void *)0) */
76
#define NULL                        0
77
#endif
78
 
79
#ifndef PNULL
80
#define PNULL                       ((PVOID)0)
81
#endif
82
 
83
#ifndef BIT_0                       /* set bits */
84
#define BIT_0                       0x1
85
#define BIT_1                       0x2
86
#define BIT_2                       0x4
87
#define BIT_3                       0x8
88
#define BIT_4                       0x10
89
#define BIT_5                       0x20
90
#define BIT_6                       0x40
91
#define BIT_7                       0x80
92
 
93
#define BIT_8                       0x100
94
#define BIT_9                       0x200
95
#define BIT_10                      0x400
96
#define BIT_11                      0x800
97
#define BIT_12                      0x1000
98
#define BIT_13                      0x2000
99
#define BIT_14                      0x4000
100
#define BIT_15                      0x8000
101
 
102
#define BIT_16                      0x10000L
103
#define BIT_17                      0x20000L
104
#define BIT_18                      0x40000L
105
#define BIT_19                      0x80000L
106
#define BIT_20                      0x100000L
107
#define BIT_21                      0x200000L
108
#define BIT_22                      0x400000L
109
#define BIT_23                      0x800000L
110
 
111
#define BIT_24                      0x1000000L
112
#define BIT_25                      0x2000000L
113
#define BIT_26                      0x4000000L
114
#define BIT_27                      0x8000000L
115
#define BIT_28                      0x10000000L
116
#define BIT_29                      0x20000000L
117
#define BIT_30                      0x40000000L
118
#define BIT_31                      0x80000000L
119
#endif
120
 
121
#ifndef TRUE                        /* true and false */
122
#define TRUE                        (BOOL)1
123
#endif
124
 
125
#ifndef FALSE
126
#define FALSE                       (BOOL)0
127
#endif
128
 
129
#if defined(WIN32_SH4) && defined(__cplusplus)
130
#define _SIZE_T
131
#else
132
#ifndef _SIZE_T
133
#define _SIZE_T
134
typedef unsigned long size_t;
135
#endif
136
#endif
137
 
138
#ifndef BOOL
139
#define BOOL                        BOOL
140
typedef unsigned char BOOL;
141
#endif
142
 
143
#ifndef PBOOL
144
#define PBOOL                       PBOOL
145
typedef unsigned char *PBOOL;
146
#endif
147
 
148
#ifndef TCHAR
149
#define TCHAR                       TCHAR
150
typedef char    TCHAR;
151
#endif
152
 
153
#ifndef PTCHAR
154
#define PTCHAR                      PTCHAR
155
typedef char   *PTCHAR;
156
#endif
157
 
158
#ifndef PCTCHAR
159
#define PCTCHAR                     PCTCHAR
160
typedef char   *const PCTCHAR;
161
#endif
162
 
163
#ifndef CPCTCHAR
164
#define CPCTCHAR                    CPCTCHAR
165
typedef const char *const CPCTCHAR;
166
#endif
167
 
168
#ifndef CHAR
169
#define CHAR                        CHAR
170
typedef char    CHAR;
171
#endif
172
 
173
#ifndef CCHAR
174
#define CCHAR                       CCHAR
175
typedef const char CCHAR;
176
#endif
177
 
178
#ifndef PCHAR
179
#define PCHAR                       PCHAR
180
typedef char    *PCHAR;
181
#endif
182
 
183
#ifndef CPCHAR
184
#define CPCHAR                      CPCHAR
185
typedef const char *CPCHAR;
186
#endif
187
 
188
#ifndef PCCHAR
189
#define PCCHAR                      PCCHAR
190
typedef char *const PCCHAR;
191
#endif
192
 
193
#ifndef CPCCHAR
194
#define CPCCHAR                     CPCCHAR
195
typedef const char *const CPCCHAR;
196
#endif
197
 
198
#ifndef PTSTR
199
#define PTSTR                       PTSTR
200
typedef const char *PTSTR;
201
#endif
202
 
203
#ifndef PCTSTR
204
#define PCTSTR                      PCTSTR
205
typedef char *const PCTSTR;
206
#endif
207
 
208
#ifndef PCTSTR
209
#define PCTSTR                      PCTSTR
210
typedef const char *PCTSTR;
211
#endif
212
 
213
#ifndef PTSTR
214
#define PTSTR                       PTSTR
215
typedef char *PTSTR;
216
#endif
217
 
218
#ifndef BYTE
219
#define BYTE                        BYTE
220
typedef unsigned char BYTE;
221
#endif
222
 
223
#ifndef PBYTE
224
#define PBYTE                       PBYTE
225
typedef unsigned char *PBYTE;
226
#endif
227
 
228
#ifndef PCBYTE
229
#define PCBYTE                      PCBYTE
230
typedef unsigned char *const PCBYTE;
231
#endif
232
 
233
#ifndef CPBYTE
234
#define CPBYTE                      CPBYTE
235
typedef const unsigned char *CPBYTE;
236
#endif
237
 
238
#ifndef SHORT
239
#define SHORT                       SHORT
240
typedef short   SHORT;
241
#endif
242
 
243
#ifndef PSHORT
244
#define PSHORT                      PSHORT
245
typedef short *PSHORT;
246
#endif
247
 
248
#ifndef PCSHORT
249
#define PCSHORT                     PCSHORT
250
typedef short *const PCSHORT;
251
#endif
252
 
253
#ifndef CPSHORT
254
#define CPSHORT                     CPSHORT
255
typedef const short *CPSHORT;
256
#endif
257
 
258
#ifndef USHORT
259
#define USHORT                      USHORT
260
typedef unsigned short USHORT;
261
#endif
262
 
263
#ifndef PUSHORT
264
#define PUSHORT                     PUSHORT
265
typedef unsigned short *PUSHORT;
266
#endif
267
 
268
#ifndef PCUSHORT
269
#define PCUSHORT                    PCUSHORT
270
typedef unsigned short *const PCUSHORT;
271
#endif
272
 
273
#ifndef CPUSHORT
274
#define CPUSHORT                    CPUSHORT
275
typedef const unsigned short *CPUSHORT;
276
#endif
277
 
278
#ifndef WORD
279
#define WORD                        WORD
280
typedef unsigned short WORD;
281
#endif
282
 
283
#ifndef PWORD
284
#define PWORD                       PWORD
285
typedef unsigned short *PWORD;
286
#endif
287
 
288
#ifndef PCWORD
289
#define PCWORD                      PCWORD
290
typedef unsigned short *const PCWORD;
291
#endif
292
 
293
#ifndef INT
294
#define INT                         INT
295
typedef int INT;
296
#endif
297
 
298
#ifndef CINT
299
#define CINT                        CINT
300
typedef const int CINT;
301
#endif
302
 
303
#ifndef PINT
304
#define PINT                        PINT
305
typedef int *PINT;
306
#endif
307
 
308
#ifndef PCINT
309
#define PCINT                       PCINT
310
typedef int *const PCINT;
311
#endif
312
 
313
#ifndef CPINT
314
#define CPINT                       CPINT
315
typedef const int *CPINT;
316
#endif
317
 
318
#ifndef UINT
319
#define UINT                        UINT
320
typedef unsigned int UINT;
321
#endif
322
 
323
#ifndef PUINT
324
#define PUINT                       PUINT
325
typedef unsigned int *PUINT;
326
#endif
327
 
328
#ifndef PCUINT
329
#define PCUINT                      PCUINT
330
typedef unsigned int *const PCUINT;
331
#endif
332
 
333
#ifndef CPUINT
334
#define CPUINT                      CPUINT
335
typedef const unsigned int *CPUINT;
336
#endif
337
 
338
#ifndef DWORD
339
#define DWORD                       DWORD
340
typedef unsigned long DWORD;
341
#endif
342
 
343
#ifndef PDWORD
344
#define PDWORD                      PDWORD
345
typedef unsigned long *PDWORD;
346
#endif
347
 
348
#ifndef PCDWORD
349
#define PCDWORD                     PCDWORD
350
typedef unsigned long *const PCDWORD;
351
#endif
352
 
353
#ifndef CPDWORD
354
#define CPDWORD                     CPDWORD
355
typedef const unsigned long *CPDWORD;
356
#endif
357
 
358
#ifndef LONG
359
#define LONG                        LONG
360
typedef long LONG;
361
#endif
362
 
363
#ifndef PLONG
364
#define PLONG                       PLONG
365
typedef long *PLONG;
366
#endif
367
 
368
#ifndef PCLONG
369
#define PCLONG                      PCLONG
370
typedef long *const PCLONG;
371
#endif
372
 
373
#ifndef CPLONG
374
#define CPLONG                      CPLONG
375
typedef const long *CPLONG;
376
#endif
377
 
378
#ifndef ULONG
379
#define ULONG                       ULONG
380
typedef unsigned long ULONG;
381
#endif
382
 
383
#ifndef PULONG
384
#define PULONG                      PULONG
385
typedef unsigned long *PULONG;
386
#endif
387
 
388
#ifndef PCULONG
389
#define PCULONG   PCULONG
390
typedef unsigned long *const        PCULONG;
391
#endif
392
 
393
#ifndef CPULONG
394
#define CPULONG                     CPULONG
395
typedef const unsigned long *CPULONG;
396
#endif
397
 
398
#ifndef FLOAT
399
#define FLOAT                       FLOAT
400
typedef float FLOAT;
401
#endif
402
 
403
#ifndef DOUBLE
404
#define DOUBLE                      DOUBLE
405
typedef long double DOUBLE;
406
#endif
407
 
408
#ifndef PDOUBLE
409
#define PDOUBLE                     PDOUBLE
410
typedef long double *PDOUBLE;
411
#endif
412
 
413
#ifndef CPDOUBLE
414
#define CPDOUBLE                    CPDOUBLE
415
typedef const long double *CPDOUBLE;
416
#endif
417
 
418
#ifndef PCDOUBLE
419
#define PCDOUBLE                    PCDOUBLE
420
typedef long double *const PCDOUBLE;
421
#endif
422
 
423
#ifndef PVOID
424
#define PVOID   PVOID
425
typedef void *PVOID;
426
#endif
427
 
428
#ifndef VOID
429
#define VOID                        VOID
430
typedef void VOID;
431
#endif
432
 
433
#ifndef IOID
434
#define IOID                        IOID
435
typedef unsigned short IOID;
436
#endif
437
 
438
#ifndef PIOID
439
#define PIOID                       PIOID
440
typedef unsigned short *PIOID;
441
#endif
442
 
443
#ifndef BBYTE
444
#define BBYTE   BBYTE
445
typedef union {
446
    unsigned char   BYTE;       /*lint -e46 */
447
                                /* this is correct */
448
    struct {
449
        #ifdef _BITFIELDS_MSB_FIRST_
450
        unsigned char B7:1;
451
        unsigned char B6:1;
452
        unsigned char B5:1;
453
        unsigned char B4:1;
454
        unsigned char B3:1;
455
        unsigned char B2:1;
456
        unsigned char B1:1;
457
        unsigned char B0:1;
458
        #else
459
        unsigned char B0:1;
460
        unsigned char B1:1;
461
        unsigned char B2:1;
462
        unsigned char B3:1;
463
        unsigned char B4:1;
464
        unsigned char B5:1;
465
        unsigned char B6:1;
466
        unsigned char B7:1;
467
        #endif
468
    } BIT;
469
} BBYTE;
470
#endif
471
 
472
#endif /* TYPES_H_INCLUDED */
473
 
474
/******************************************************************************
475
End  Of File
476
******************************************************************************/

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.