forked from rasteri/HIDman
-
Notifications
You must be signed in to change notification settings - Fork 0
/
type.h
154 lines (139 loc) · 3.19 KB
/
type.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
#ifndef __BASE_TYPE__
#define __BASE_TYPE__
#include <stdint.h>
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif
/*----- constant and type define -----------------------------------------*/
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
#ifndef true
#define true 1
#endif
#ifndef false
#define false 0
#endif
#ifndef NULL
#define NULL 0
#endif
#ifndef BOOL
typedef bool BOOL;
#endif
#ifndef UINT8
typedef unsigned char UINT8;
#endif
#ifndef INT8
typedef signed char INT8;
#endif
#ifndef UINT16
typedef unsigned short UINT16;
#endif
#ifndef INT16
typedef signed short INT16;
#endif
#ifndef UINT32
typedef unsigned long UINT32;
#endif
#ifndef INT32
typedef signed long INT32;
#endif
#ifndef UINT8D
typedef unsigned char __data UINT8D;
#endif
#ifndef UINT16D
typedef unsigned short __data UINT16D;
#endif
#ifndef UINT32D
typedef unsigned long __data UINT32D;
#endif
#ifndef UINT8I
typedef unsigned char __idata UINT8I;
#endif
#ifndef UINT16I
typedef unsigned short __idata UINT16I;
#endif
#ifndef UINT32I
typedef unsigned long __idata UINT32I;
#endif
#ifndef UINT8X
typedef unsigned char __xdata UINT8X;
#endif
#ifndef UINT16X
typedef unsigned short __xdata UINT16X;
#endif
#ifndef UINT32X
typedef unsigned long __xdata UINT32X;
#endif
#ifndef UINT8V
typedef unsigned char volatile UINT8V;
#endif
#ifndef UINT8DV
typedef unsigned char volatile __data UINT8DV;
#endif
#ifndef UINT8XV
typedef unsigned char volatile __xdata UINT8XV;
#endif
#ifndef UINT8PV
typedef unsigned char volatile __pdata UINT8PV;
#endif
#ifndef UINT8C
typedef const unsigned char __code UINT8C;
#endif
#ifndef PUINT8
typedef unsigned char *PUINT8;
#endif
#ifndef PUINT16
typedef unsigned short *PUINT16;
#endif
#ifndef PUINT32
typedef unsigned long *PUINT32;
#endif
#ifndef PUINT8I
typedef unsigned char __idata *PUINT8I;
#endif
#ifndef PUINT16I
typedef unsigned short __idata *PUINT16I;
#endif
#ifndef PUINT32I
typedef unsigned long __idata *PUINT32I;
#endif
#ifndef PUINT8X
typedef unsigned char __xdata *PUINT8X;
#endif
#ifndef PUINT16X
typedef unsigned short __xdata *PUINT16X;
#endif
#ifndef PUINT32X
typedef unsigned long __xdata *PUINT32X;
#endif
#ifndef PUINT8V
typedef unsigned char volatile *PUINT8V;
#endif
#ifndef PUINT8DV
typedef unsigned char volatile __data *PUINT8DV;
#endif
#ifndef PUINT8XV
typedef unsigned char volatile __xdata *PUINT8XV;
#endif
#ifndef PUINT8PV
typedef unsigned char volatile __pdata *PUINT8PV;
#endif
#ifndef PUINT8C
typedef const unsigned char __code *PUINT8C;
#endif
typedef unsigned char uchar;
typedef unsigned short ushort;
typedef unsigned int uint;
typedef unsigned long ulong;
#ifndef STRUCT_OFFSET
#define STRUCT_OFFSET( s, m ) ( (UINT8)( & (((s) *)0) -> (m) ) ) /* get the offset address for a member of a structure */
#endif
#ifdef __cplusplus
}
#endif
#endif // __BASE_TYPE__