-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathType.h
132 lines (124 loc) · 3.04 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
/*--------------------------------------------------------------------------
CH552.H
Header file for CH552 microcontrollers.
****************************************
** Copyright (C) W.ch 1999-2016 **
** Web: http://wch.cn **
****************************************
--------------------------------------------------------------------------*/
#ifndef __BASE_TYPE__
#define __BASE_TYPE__
#ifdef __cplusplus
extern "C" {
#endif
/*----- constant and type define -----------------------------------------*/
#ifndef TRUE
#define TRUE 1
#define FALSE 0
#endif
#ifndef NULL
#define NULL 0
#endif
#ifndef BOOL
typedef bit BOOL;
#endif
#ifndef UINT8
typedef unsigned char UINT8;
#endif
#ifndef UINT16
typedef unsigned short UINT16;
#endif
#ifndef UINT32
typedef unsigned long UINT32;
#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
#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__