Select one of the symbols to view example projects that use it.
 
Outline
Includes
#include "exc7200.h"
Private typedef
Private define
Private macro
Private variables
exc7200_ts_drv
aBufferTS
Private function prototypes
exc7200_Init(uint16_t)
exc7200_Reset(uint16_t)
exc7200_ReadID(uint16_t)
exc7200_TS_Start(uint16_t)
exc7200_TS_DetectTouch(uint16_t)
exc7200_TS_GetXY(uint16_t, uint16_t *, uint16_t *)
exc7200_TS_EnableIT(uint16_t)
exc7200_TS_DisableIT(uint16_t)
exc7200_TS_ITStatus(uint16_t)
exc7200_TS_ClearIT(uint16_t)
Files
loading...
CodeScopeSTM32 Libraries and Samplesexc7200exc7200.c
 
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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/** ****************************************************************************** * @file exc7200.c * @author MCD Application Team * @brief This file provides a set of functions needed to manage the EXC7200 * Touch-screen controller. ****************************************************************************** * @attention * * Copyright (c) 2015 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file * in the root directory of this software component. * If no LICENSE file comes with this software, it is provided AS-IS. * ****************************************************************************** *//* ... */ /* Includes ------------------------------------------------------------------*/ #include "exc7200.h" /** @addtogroup BSP * @{ *//* ... */ /** @addtogroup Component * @{ *//* ... */ /** @defgroup EXC7200 * @{ *//* ... */ Includes /* Private typedef -----------------------------------------------------------*/ /** @defgroup EXC7200_Private_Types_Definitions * @{ *//* ... */ Private typedef /* Private define ------------------------------------------------------------*/ /** @defgroup EXC7200_Private_Defines * @{ *//* ... */ Private define /* Private macro -------------------------------------------------------------*/ /** @defgroup EXC7200_Private_Macros * @{ *//* ... */ Private macro /* Private variables ---------------------------------------------------------*/ /** @defgroup EXC7200_Private_Variables * @{ *//* ... */ /* Touch screen driver structure initialization */ 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 -----------------------------------------------*/ /** @defgroup exc7200_Private_Function_Prototypes * @{ *//* ... */ Private function prototypes /* Private functions ---------------------------------------------------------*/ /** @defgroup exc7200_Private_Functions * @{ *//* ... */ /** * @brief Initialize the exc7200 and configure the needed hardware resources * @param DeviceAddr: Device address on communication Bus. * @retval None *//* ... */ void exc7200_Init(uint16_t DeviceAddr) { /* Initialize IO BUS layer */ IOE_Init(); }{ ... } /** * @brief Reset the exc7200 by Software. * @param DeviceAddr: Device address on communication Bus. * @retval None *//* ... */ void exc7200_Reset(uint16_t DeviceAddr) { }{ ... } /** * @brief Read the exc7200 IO Expander device ID. * @param DeviceAddr: Device address on communication Bus. * @retval The Device ID (two bytes). *//* ... */ uint16_t exc7200_ReadID(uint16_t DeviceAddr) { return 0; }{ ... } /** * @brief Configures the touch Screen Controller (Single point detection) * @param DeviceAddr: Device address on communication Bus. * @retval None. *//* ... */ void exc7200_TS_Start(uint16_t DeviceAddr) { }{ ... } /** * @brief Return if there is touch detected or not. * @param DeviceAddr: Device address on communication Bus. * @retval Touch detected state. *//* ... */ uint8_t exc7200_TS_DetectTouch(uint16_t DeviceAddr) { /* Read TS data : Send I2C Slave address + 1 Bit0=1 for:read */ IOE_ReadMultiple(DeviceAddr | 1, EXC7200_READ_CMD, aBufferTS, 10); /* check for first byte */ if (aBufferTS[1]==0x83) { return 1; }if (aBufferTS[1]==0x83) { ... } return 0; }{ ... } /** * @brief Get the touch screen X and Y positions values * @param DeviceAddr: Device address on communication Bus. * @param X: Pointer to X position value * @param Y: Pointer to Y position value * @retval None. *//* ... */ void exc7200_TS_GetXY(uint16_t DeviceAddr, uint16_t *X, uint16_t *Y) { /* Calculate positions */ *X = (((aBufferTS[3]&0x00ff) << 4) | ((aBufferTS[2]&0x00f0) >> 4)) << 1; *Y = (((aBufferTS[5]&0x00ff) << 4) | ((aBufferTS[4]&0x00f0) >> 4)) << 1; /* Dummy Read to deactivate read mode */ IOE_ReadMultiple(DeviceAddr, EXC7200_READ_CMD, aBufferTS, 10); }{ ... } /** * @brief Configure the selected source to generate a global interrupt or not * @param DeviceAddr: Device address on communication Bus. * @retval None *//* ... */ void exc7200_TS_EnableIT(uint16_t DeviceAddr) { }{ ... } /** * @brief Configure the selected source to generate a global interrupt or not * @param DeviceAddr: Device address on communication Bus. * @retval None *//* ... */ void exc7200_TS_DisableIT(uint16_t DeviceAddr) { }{ ... } /** * @brief Configure the selected source to generate a global interrupt or not * @param DeviceAddr: Device address on communication Bus. * @retval TS interrupts status *//* ... */ uint8_t exc7200_TS_ITStatus(uint16_t DeviceAddr) { return 0; }{ ... } /** * @brief Configure the selected source to generate a global interrupt or not * @param DeviceAddr: Device address on communication Bus. * @retval None *//* ... */ void exc7200_TS_ClearIT(uint16_t DeviceAddr) { }{ ... } /** * @} *//* ... */ /** * @} *//* ... */ /** * @} *//* ... */ /** * @} *//* ... */