Browse Source

Add files missing due to git problems

inmarket 2 years ago
parent
commit
718fb4e4a0
4 changed files with 409 additions and 0 deletions
  1. 166 0
      drivers/gdisp/UC8173/UC8173_waveform_examples.h
  2. 112 0
      src/gos/gos_cmsis2.c
  3. 99 0
      src/gos/gos_cmsis2.h
  4. 32 0
      src/gos/gos_rtx5.h

+ 166 - 0
drivers/gdisp/UC8173/UC8173_waveform_examples.h

@@ -0,0 +1,166 @@
1
+static uint8_t const _lut_ft[] = {
2
+	0x55,0x55,0x55,0x55,0x55,0xAA,0xAA,0xAA,0xAA,0xAA,0x55,0x55,0x55,0x55,0x55,0x55,
3
+	0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x5A,0x5A,
4
+	0x5A,0x5A,0x5A,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0x5A,0x5A,
5
+	0x5A,0x5A,0x5A,0x5A,0x5A,0x5A,0x5A,0x5A,0x5A,0x5A,0x5A,0x5A,0x00,0xFF,0x00,0x00,
6
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
7
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
8
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
9
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
10
+};
11
+
12
+static uint8_t const _lut_KWvcom_DC_GU[] = {
13
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,
14
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
15
+};
16
+static uint8_t const _lut_kw_GU[] = {
17
+	0x01,0x00,0x00,0x80,0x01,0x00,0x00,0x80,0x01,0x00,0x00,0x80,0x01,0x00,0x00,0x80,
18
+	0x01,0x00,0x00,0x80,0x01,0x00,0x00,0x80,0x01,0x00,0x00,0x80,0x01,0x00,0x00,0x80,
19
+	0x01,0x00,0x00,0x80,0x01,0x00,0x00,0x80,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,
20
+	0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,
21
+	0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,
22
+	0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,
23
+	0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,
24
+	0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,
25
+	0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,
26
+	0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,
27
+	0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,
28
+	0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,
29
+	0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,
30
+	0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,
31
+	0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,
32
+	0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
33
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
34
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
35
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
36
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
37
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
38
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
39
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
40
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
41
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
42
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
43
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
44
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
45
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
46
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
47
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
48
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
49
+};
50
+
51
+static uint8_t const _lut_KWvcom_GC[] = {
52
+	0x55,0x6A,0xA5,0x55,0x55,0x55,0x55,0x55,0x56,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0x0C,
53
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
54
+};
55
+static uint8_t const _lut_kw_GC[] = {
56
+	0x41,0x00,0x00,0x81,0x41,0x00,0x00,0x81,0x41,0x00,0x00,0x81,0x41,0x00,0x00,0x81,
57
+	0x41,0x00,0x00,0x81,0x81,0x00,0x00,0x82,0x81,0x00,0x00,0x82,0x81,0x00,0x00,0x82,
58
+	0x81,0x00,0x00,0x82,0x81,0x00,0x00,0x82,0x42,0x00,0x00,0x41,0x42,0x00,0x00,0x41,
59
+	0x42,0x00,0x00,0x41,0x42,0x00,0x00,0x41,0x42,0x00,0x00,0x41,0x42,0x00,0x00,0x41,
60
+	0x42,0x00,0x00,0x41,0x42,0x00,0x00,0x41,0x42,0x00,0x00,0x41,0x42,0x00,0x00,0x41,
61
+	0x42,0x00,0x00,0x41,0x42,0x00,0x00,0x41,0x42,0x00,0x00,0x41,0x42,0x00,0x00,0x41,
62
+	0x42,0x00,0x00,0x41,0x42,0x00,0x00,0x41,0x42,0x00,0x00,0x41,0x42,0x00,0x00,0x41,
63
+	0x42,0x00,0x00,0x41,0x42,0x00,0x00,0x41,0x42,0x00,0x00,0x41,0x42,0x00,0x00,0x41,
64
+	0x42,0x00,0x00,0x41,0x42,0x00,0x00,0x41,0x42,0x00,0x00,0x41,0x82,0x00,0x00,0x42,
65
+	0x82,0x00,0x00,0x42,0x82,0x00,0x00,0x42,0x82,0x00,0x00,0x42,0x82,0x00,0x00,0x42,
66
+	0x82,0x00,0x00,0x42,0x82,0x00,0x00,0x42,0x82,0x00,0x00,0x42,0x82,0x00,0x00,0x42,
67
+	0x82,0x00,0x00,0x42,0x82,0x00,0x00,0x42,0x82,0x00,0x00,0x42,0x82,0x00,0x00,0x42,
68
+	0x82,0x00,0x00,0x42,0x82,0x00,0x00,0x42,0x82,0x00,0x00,0x42,0x82,0x00,0x00,0x42,
69
+	0x82,0x00,0x00,0x42,0x82,0x00,0x00,0x42,0x82,0x00,0x00,0x42,0x82,0x00,0x00,0x42,
70
+	0x82,0x00,0x00,0x42,0x82,0x00,0x00,0x42,0x82,0x00,0x00,0x42,0x82,0x00,0x00,0x42,
71
+	0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
72
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
73
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
74
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
75
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
76
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
77
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
78
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
79
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
80
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
81
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
82
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
83
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
84
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
85
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
86
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
87
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
88
+};
89
+
90
+static uint8_t const _lut_KWvcom_DC_A2_240ms[] = {
91
+	0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
92
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
93
+};
94
+static uint8_t const _lut_kw_A2_240ms[] = {
95
+	0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,
96
+	0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,
97
+	0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,
98
+	0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,
99
+	0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,
100
+	0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,
101
+	0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
102
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
103
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
104
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
105
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
106
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
107
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
108
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
109
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
110
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
111
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
112
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
113
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
114
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
115
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
116
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
117
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
118
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
119
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
120
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
121
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
122
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
123
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
124
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
125
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
126
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
127
+};
128
+
129
+static uint8_t const _lut_KWvcom_DC_A2_120ms[] = {
130
+	0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
131
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
132
+};
133
+static uint8_t const _lut_kw_A2_120ms[] = {
134
+	0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,
135
+	0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,
136
+	0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,
137
+	0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
138
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
139
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
140
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
141
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
142
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
143
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
144
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
145
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
146
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
147
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
148
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
149
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
150
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
151
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
152
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
153
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
154
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
155
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
156
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
157
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
158
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
159
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
160
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
161
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
162
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
163
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
164
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
165
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
166
+};

+ 112 - 0
src/gos/gos_cmsis2.c

@@ -0,0 +1,112 @@
1
+/*
2
+ * This file is subject to the terms of the GFX License. If a copy of
3
+ * the license was not distributed with this file, you can obtain one at:
4
+ *
5
+ *              http://ugfx.org/license.html
6
+ */
7
+
8
+#include "../../gfx.h"
9
+#include <string.h>
10
+
11
+#if GFX_USE_OS_CMSIS2
12
+
13
+#error "GOS: CMSIS2 - This port is not yet complete"
14
+
15
+#if !GFX_OS_NO_INIT && !GFX_OS_CALL_UGFXMAIN
16
+	#error "GOS: Either GFX_OS_NO_INIT or GFX_OS_CALL_UGFXMAIN must be defined for CMSIS V2"
17
+#endif
18
+
19
+void _gosHeapInit(void);
20
+
21
+void _gosInit(void)
22
+{
23
+	#if GFX_OS_NO_INIT && !GFX_OS_INIT_NO_WARNING
24
+		#if GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_DIRECT
25
+			#warning "GOS: Operating System initialization has been turned off. Make sure you call osKernelInitialize()."
26
+		#elif GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_MACRO
27
+			COMPILER_WARNING("GOS: Operating System initialization has been turned off. Make sure you call osKernelInitialize().")
28
+		#endif
29
+	#endif
30
+
31
+	// Set up the heap allocator
32
+	_gosHeapInit();
33
+}
34
+
35
+#if !GFX_OS_NO_INIT && GFX_OS_CALL_UGFXMAIN
36
+	static DECLARE_THREAD_FUNCTION(startUGFX_CMSIS2, p) {
37
+		(void) p;
38
+		uGFXMain();
39
+	}
40
+#endif
41
+void _gosPostInit(void)
42
+{
43
+	#if !GFX_OS_NO_INIT && GFX_OS_CALL_UGFXMAIN
44
+		switch(osKernelGetState()) {
45
+		case osKernelInactive:
46
+			osKernelInitialize();
47
+			/* Fall Through */
48
+		case osKernelReady:
49
+			gfxThreadCreate(0, GFX_OS_UGFXMAIN_STACKSIZE, NORMAL_PRIORITY, startUGFX_CMSIS2, 0);
50
+			osKernelStart();
51
+			gfxHalt("Unable to start CMSIS V2 scheduler. Out of memory?");
52
+			break;
53
+		default:
54
+			gfxThreadCreate(0, GFX_OS_UGFXMAIN_STACKSIZE, NORMAL_PRIORITY, startUGFX_CMSIS2, 0);
55
+			break;
56
+		}
57
+	#endif
58
+}
59
+
60
+void _gosDeinit(void)
61
+{
62
+}
63
+
64
+void gfxMutexInit(gfxMutex* pmutex)
65
+{
66
+	*pmutex = osMutexNew(NULL);
67
+}
68
+
69
+void gfxSemInit(gfxSem* psem, semcount_t val, semcount_t limit)
70
+{
71
+	*pmutex = osSemaphoreNew(limit, val, NULL);
72
+}
73
+
74
+bool_t gfxSemWait(gfxSem* psem, delaytime_t ms)
75
+{
76
+	if (osSemaphoreAcquire(*psem, gfxMillisecondsToTicks(ms)) == osOK)
77
+		return TRUE;
78
+	return FALSE;
79
+}
80
+
81
+gfxThreadHandle gfxThreadCreate(void* stackarea, size_t stacksz, threadpriority_t prio, DECLARE_THREAD_FUNCTION((*fn),p), void* param)
82
+{
83
+	osThreadAttr_t def;
84
+
85
+	(void)stackarea;
86
+
87
+	memset(&def, 0, sizeof(def));
88
+	def.name = "uGFX";
89
+	def.attr_bits = osThreadDetached;	// osThreadJoinable
90
+	def.stack_mem = 0;
91
+	def.stack_size = stacksz;
92
+	def.priority = prio;
93
+	//def.tz_module = ????;
94
+
95
+	return osThreadNew((osThreadFunc_t)fn, param, &def);
96
+}
97
+
98
+threadreturn_t gfxThreadWait(gfxThreadHandle thread) {
99
+	while(1) {
100
+		switch(osThreadGetState(thread)) {
101
+		case osThreadReady:
102
+		case osThreadRunning:
103
+		case osThreadBlocked:
104
+			gfxYield();
105
+			break;
106
+		default:
107
+			return;
108
+		}
109
+	}
110
+}
111
+
112
+#endif /* GFX_USE_OS_CMSIS2 */

+ 99 - 0
src/gos/gos_cmsis2.h

@@ -0,0 +1,99 @@
1
+/*
2
+ * This file is subject to the terms of the GFX License. If a copy of
3
+ * the license was not distributed with this file, you can obtain one at:
4
+ *
5
+ *              http://ugfx.org/license.html
6
+ */
7
+
8
+/**
9
+ * @file    src/gos/gos_cmsis2.h
10
+ * @brief   GOS - Operating System Support header file for CMSIS 2.0 RTOS.
11
+ */
12
+
13
+#ifndef _GOS_CMSIS2_H
14
+#define _GOS_CMSIS2_H
15
+
16
+#if GFX_USE_OS_CMSIS2
17
+
18
+#include <stdbool.h>
19
+#include "cmsis_os2.h"
20
+
21
+#ifndef GFX_OS_HEAP_SIZE
22
+	#define GFX_OS_HEAP_SIZE 10240
23
+#endif
24
+
25
+/*===========================================================================*/
26
+/* Type definitions                                                          */
27
+/*===========================================================================*/
28
+
29
+typedef bool				bool_t;
30
+
31
+#define TIME_IMMEDIATE		0
32
+#define TIME_INFINITE		osWaitForever
33
+typedef uint32_t			delaytime_t;
34
+typedef uint32_t			systemticks_t;
35
+typedef uint16_t			semcount_t;
36
+typedef void				threadreturn_t;
37
+typedef osPriority_t		threadpriority_t;
38
+
39
+#define MAX_SEMAPHORE_COUNT	osFeature_Semaphore
40
+#define LOW_PRIORITY		osPriorityLow
41
+#define NORMAL_PRIORITY		osPriorityNormal
42
+#define HIGH_PRIORITY		osPriorityHigh
43
+
44
+typedef osSemaphoreId_t		gfxSem;
45
+
46
+typedef osMutexId_t 		gfxMutex;
47
+
48
+typedef osThreadId_t		gfxThreadHandle;
49
+
50
+#define DECLARE_THREAD_STACK(name, sz)			uint8_t name[1];	// Some compilers don't allow zero sized arrays. Let's waste one byte
51
+#define DECLARE_THREAD_FUNCTION(fnName, param)	threadreturn_t fnName(void* param)
52
+#define THREAD_RETURN(retval)
53
+
54
+/*===========================================================================*/
55
+/* Function declarations.                                                    */
56
+/*===========================================================================*/
57
+
58
+#ifdef __cplusplus
59
+extern "C" {
60
+#endif
61
+
62
+#define gfxExit()					os_error(0)
63
+#define gfxHalt(msg)				os_error(1)
64
+#define gfxSystemTicks()			osKernelGetSysTimerCount()
65
+#define gfxMillisecondsToTicks(ms)	(1000*(ms)/osKernelGetTickFreq())
66
+#define gfxSystemLock()				osKernelLock()
67
+#define gfxSystemUnlock()			osKernelUnlock()
68
+#define gfxSleepMilliseconds(ms) 	osDelay(ms)
69
+
70
+void gfxMutexInit(gfxMutex* pmutex);
71
+#define gfxMutexDestroy(pmutex)		osMutexDelete(*(pmutex))
72
+#define gfxMutexEnter(pmutex)		osMutexAcquire(*(pmutex), TIME_INFINITE)
73
+#define gfxMutexExit(pmutex)		osMutexRelease(*(pmutex))
74
+
75
+void gfxSemInit(gfxSem* psem, semcount_t val, semcount_t limit);
76
+#define gfxSemDestroy(psem)		osSemaphoreDelete(*(psem))
77
+bool_t gfxSemWait(gfxSem* psem, delaytime_t ms);
78
+#define gfxSemWaitI(psem)		gfxSemWait((psem), 0)
79
+#define gfxSemSignal(psem)		osSemaphoreRelease(*(psem))
80
+#define gfxSemSignalI(psem)		osSemaphoreRelease(*(psem))
81
+
82
+gfxThreadHandle gfxThreadCreate(void* stackarea, size_t stacksz, threadpriority_t prio, DECLARE_THREAD_FUNCTION((*fn),p), void* param);
83
+#define gfxYield()					osThreadYield()
84
+#define gfxThreadMe()				osThreadGetId()
85
+#define gfxThreadClose(thread)		{}
86
+
87
+#ifdef __cplusplus
88
+}
89
+#endif
90
+
91
+/*===========================================================================*/
92
+/* Use the generic heap handling                                             */
93
+/*===========================================================================*/
94
+
95
+#define GOS_NEED_X_HEAP TRUE
96
+#include "gos_x_heap.h"
97
+
98
+#endif /* GFX_USE_OS_CMSIS */
99
+#endif /* _GOS_CMSIS_H */

+ 32 - 0
src/gos/gos_rtx5.h

@@ -0,0 +1,32 @@
1
+/*
2
+ * This file is subject to the terms of the GFX License. If a copy of
3
+ * the license was not distributed with this file, you can obtain one at:
4
+ *
5
+ *              http://ugfx.org/license.html
6
+ */
7
+
8
+/**
9
+ * @file    src/gos/gos_rtx5.h
10
+ * @brief   GOS - Operating System Support header file for Keil RTX
11
+ */
12
+
13
+#ifndef _GOS_RTX5_H
14
+#define _GOS_RTX5_H
15
+
16
+#if GFX_USE_OS_RTX5
17
+
18
+/*
19
+ * Keil RTX uses the CMSIS RTOS interface. Therefore, just use the CMSIS2 RTOS port
20
+ */
21
+
22
+// Disable KEIL to avoid error: "GOS: More than one operation system has been defined as TRUE."
23
+#undef GFX_USE_OS_RTX5
24
+#define GFX_USE_OS_RTX5 FALSE
25
+
26
+// Enable generic CMSIS RTOS implementation
27
+#undef GFX_USE_OS_CMSIS2
28
+#define GFX_USE_OS_CMSIS2 TRUE
29
+#include "gos_cmsis2.h"
30
+
31
+#endif /* GFX_USE_OS_RTX5 */
32
+#endif /* _GOS_RTX5_H */