1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
35
41
47
53
54
55
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
81
82
88
89
90
93
94
99
105
106
111
115
116
121
125
126
131
134
135
140
141
142
143
144
145
146
150
151
152
153
154
161
162
163
164
165
166
167
168
169
170
171
176
179
180
185
188
189
194
198
199
204
207
208
211
212
215
216
219
220
/* ... */
#include "exc7200.h"
/* ... */
/* ... */
/* ... */
Includes
/* ... */
Private typedef
/* ... */
Private define
/* ... */
Private macro
/* ... */
TS_DrvTypeDef exc7200_ts_drv =
{
exc7200_Init,
exc7200_ReadID,
exc7200_Reset,
exc7200_TS_Start,
exc7200_TS_DetectTouch,
exc7200_TS_GetXY,
exc7200_TS_EnableIT,
exc7200_TS_ClearIT,
exc7200_TS_ITStatus,
exc7200_TS_DisableIT,
...};
uint8_t aBufferTS[10];
/* ... */
Private variables
/* ... */
Private function prototypes
/* ... */
/* ... */
void exc7200_Init(uint16_t DeviceAddr)
{
IOE_Init();
}{ ... }
/* ... */
void exc7200_Reset(uint16_t DeviceAddr)
{
}{ ... }
/* ... */
uint16_t exc7200_ReadID(uint16_t DeviceAddr)
{
return 0;
}{ ... }
/* ... */
void exc7200_TS_Start(uint16_t DeviceAddr)
{
}{ ... }
/* ... */
uint8_t exc7200_TS_DetectTouch(uint16_t DeviceAddr)
{
IOE_ReadMultiple(DeviceAddr | 1, EXC7200_READ_CMD, aBufferTS, 10);
if (aBufferTS[1]==0x83)
{
return 1;
}if (aBufferTS[1]==0x83) { ... }
return 0;
}{ ... }
/* ... */
void exc7200_TS_GetXY(uint16_t DeviceAddr, uint16_t *X, uint16_t *Y)
{
*X = (((aBufferTS[3]&0x00ff) << 4) | ((aBufferTS[2]&0x00f0) >> 4)) << 1;
*Y = (((aBufferTS[5]&0x00ff) << 4) | ((aBufferTS[4]&0x00f0) >> 4)) << 1;
IOE_ReadMultiple(DeviceAddr, EXC7200_READ_CMD, aBufferTS, 10);
}{ ... }
/* ... */
void exc7200_TS_EnableIT(uint16_t DeviceAddr)
{
}{ ... }
/* ... */
void exc7200_TS_DisableIT(uint16_t DeviceAddr)
{
}{ ... }
/* ... */
uint8_t exc7200_TS_ITStatus(uint16_t DeviceAddr)
{
return 0;
}{ ... }
/* ... */
void exc7200_TS_ClearIT(uint16_t DeviceAddr)
{
}{ ... }
/* ... */
/* ... */
/* ... */
/* ... */