allow coexistance of N build and AC build.
[tomato.git] / release / src-rt-6.x / cfe / cfe / arch / mips / board / bcm963xx / include / bcmtypes.h
blob068cc80deb212fccae32d1cedb9e9437759c8633
1 //
2 // bcmtypes.h - misc useful typedefs
3 //
4 #ifndef BCMTYPES_H
5 #define BCMTYPES_H
7 // These are also defined in typedefs.h in the application area, so I need to
8 // protect against re-definition.
10 #ifndef _TYPEDEFS_H_
11 typedef unsigned char uint8;
12 typedef unsigned short uint16;
13 typedef unsigned long uint32;
14 typedef signed char int8;
15 typedef signed short int16;
16 typedef signed long int32;
17 #if !defined(__cplusplus)
18 typedef int bool;
19 #endif
20 #endif
22 typedef unsigned char byte;
23 typedef unsigned long sem_t;
25 typedef unsigned long HANDLE,*PULONG,DWORD,*PDWORD;
26 typedef signed long LONG,*PLONG;
28 typedef unsigned int *PUINT;
29 typedef signed int INT;
31 typedef unsigned short *PUSHORT;
32 typedef signed short SHORT,*PSHORT,WORD,*PWORD;
34 typedef unsigned char *PUCHAR;
35 typedef signed char *PCHAR;
37 typedef void *PVOID;
39 typedef unsigned char BOOLEAN, *PBOOL, *PBOOLEAN;
41 typedef unsigned char BYTE,*PBYTE;
43 //#ifndef __GNUC__
44 //The following has been defined in Vxworks internally: vxTypesOld.h
45 //redefine under vxworks will cause error
46 typedef signed int *PINT;
48 typedef signed char INT8;
49 typedef signed short INT16;
50 typedef signed long INT32;
52 typedef unsigned char UINT8;
53 typedef unsigned short UINT16;
54 typedef unsigned long UINT32;
56 typedef unsigned char UCHAR;
57 typedef unsigned short USHORT;
58 typedef unsigned int UINT;
59 typedef unsigned long ULONG;
61 typedef void VOID;
62 typedef unsigned char BOOL;
64 //#endif /* __GNUC__ */
67 // These are also defined in typedefs.h in the application area, so I need to
68 // protect against re-definition.
69 #ifndef TYPEDEFS_H
71 #define MAX_INT16 32767
72 #define MIN_INT16 -32768
74 // Useful for true/false return values. This uses the
75 // Taligent notation (k for constant).
76 typedef enum
78 kFalse = 0,
79 kTrue = 1
80 } Bool;
82 #endif
84 /* macros to protect against unaligned accesses */
87 #ifndef YES
88 #define YES 1
89 #endif
91 #ifndef NO
92 #define NO 0
93 #endif
95 #ifndef IN
96 #define IN
97 #endif
99 #ifndef OUT
100 #define OUT
101 #endif
103 #ifndef TRUE
104 #define TRUE 1
105 #endif
107 #ifndef FALSE
108 #define FALSE 0
109 #endif
111 #define READ32(addr) (*(volatile UINT32 *)((ULONG)&addr))
112 #define READ16(addr) (*(volatile UINT16 *)((ULONG)&addr))
113 #define READ8(addr) (*(volatile UINT8 *)((ULONG)&addr))
115 #endif