-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.h
79 lines (64 loc) · 1.2 KB
/
types.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
#ifndef _TYPES_H_
#define _TYPES_H_
#ifndef FALSE
#define FALSE 0
#endif
#ifndef TRUE
#define TRUE 1
#endif
#ifndef NULL
#define NULL 0
#endif
#ifndef MIN_U8
#define MIN_U8 0x00
#endif
#ifndef MAX_U8
#define MAX_U8 0xFF
#endif
#ifndef MIN_S8
#define MIN_S8 -0x80
#endif
#ifndef MAX_S8
#define MAX_S8 0x7F
#endif
#ifndef MIN_U16
#define MIN_U16 0x0000
#endif
#ifndef MAX_U16
#define MAX_U16 0xFFFF
#endif
#ifndef MIN_S16
#define MIN_S16 -0x8000
#endif
#ifndef MAX_S16
#define MAX_S16 0x7FFF
#endif
#ifndef MIN_U32
#define MIN_U32 0x0000
#endif
#ifndef MAX_U32
#define MAX_U32 0xFFFFFFFF
#endif
#ifndef MIN_S32
#define MIN_S32 -0x80000000
#endif
#ifndef MAX_S32
#define MAX_S32 0x7FFFFFFF
#endif
#define s8 char
#define s16 short
#define s32 int
#define u8 unsigned char
#define u16 unsigned short
#define u32 unsigned int
#define vs8 volatile s8
#define vs16 volatile s16
#define vs32 volatile s32
#define vu8 volatile u8
#define vu16 volatile u16
#define vu32 volatile u32
//#define fix16 s16
//#define fix32 s32
typedef s16 fix16;
typedef s32 fix32;
#endif // _TYPES_H_