Select one of the symbols to view example projects that use it.
 
Outline
#define __STMPE811_H
#include "../Common/ts.h"
#include "../Common/io.h"
#define STMPE811_ID
#define STMPE811_REG_CHP_ID_LSB
#define STMPE811_REG_CHP_ID_MSB
#define STMPE811_REG_ID_VER
#define STMPE811_GIT_EN
#define STMPE811_ADC_FCT
#define STMPE811_TS_FCT
#define STMPE811_IO_FCT
#define STMPE811_TEMPSENS_FCT
#define STMPE811_GIT_IO
#define STMPE811_GIT_ADC
#define STMPE811_GIT_TEMP
#define STMPE811_GIT_FE
#define STMPE811_GIT_FF
#define STMPE811_GIT_FOV
#define STMPE811_GIT_FTH
#define STMPE811_GIT_TOUCH
#define STMPE811_ALL_GIT
#define STMPE811_TS_IT
#define STMPE811_REG_SYS_CTRL1
#define STMPE811_REG_SYS_CTRL2
#define STMPE811_REG_SPI_CFG
#define STMPE811_REG_INT_CTRL
#define STMPE811_REG_INT_EN
#define STMPE811_REG_INT_STA
#define STMPE811_REG_IO_INT_EN
#define STMPE811_REG_IO_INT_STA
#define STMPE811_REG_IO_SET_PIN
#define STMPE811_REG_IO_CLR_PIN
#define STMPE811_REG_IO_MP_STA
#define STMPE811_REG_IO_DIR
#define STMPE811_REG_IO_ED
#define STMPE811_REG_IO_RE
#define STMPE811_REG_IO_FE
#define STMPE811_REG_IO_AF
#define STMPE811_REG_ADC_INT_EN
#define STMPE811_REG_ADC_INT_STA
#define STMPE811_REG_ADC_CTRL1
#define STMPE811_REG_ADC_CTRL2
#define STMPE811_REG_ADC_CAPT
#define STMPE811_REG_ADC_DATA_CH0
#define STMPE811_REG_ADC_DATA_CH1
#define STMPE811_REG_ADC_DATA_CH2
#define STMPE811_REG_ADC_DATA_CH3
#define STMPE811_REG_ADC_DATA_CH4
#define STMPE811_REG_ADC_DATA_CH5
#define STMPE811_REG_ADC_DATA_CH6
#define STMPE811_REG_ADC_DATA_CH7
#define STMPE811_REG_TSC_CTRL
#define STMPE811_REG_TSC_CFG
#define STMPE811_REG_WDM_TR_X
#define STMPE811_REG_WDM_TR_Y
#define STMPE811_REG_WDM_BL_X
#define STMPE811_REG_WDM_BL_Y
#define STMPE811_REG_FIFO_TH
#define STMPE811_REG_FIFO_STA
#define STMPE811_REG_FIFO_SIZE
#define STMPE811_REG_TSC_DATA_X
#define STMPE811_REG_TSC_DATA_Y
#define STMPE811_REG_TSC_DATA_Z
#define STMPE811_REG_TSC_DATA_XYZ
#define STMPE811_REG_TSC_FRACT_XYZ
#define STMPE811_REG_TSC_DATA_INC
#define STMPE811_REG_TSC_DATA_NON_INC
#define STMPE811_REG_TSC_I_DRIVE
#define STMPE811_REG_TSC_SHIELD
#define STMPE811_TOUCH_YD
#define STMPE811_TOUCH_XD
#define STMPE811_TOUCH_YU
#define STMPE811_TOUCH_XU
#define STMPE811_TOUCH_IO_ALL
#define STMPE811_PIN_0
#define STMPE811_PIN_1
#define STMPE811_PIN_2
#define STMPE811_PIN_3
#define STMPE811_PIN_4
#define STMPE811_PIN_5
#define STMPE811_PIN_6
#define STMPE811_PIN_7
#define STMPE811_PIN_ALL
#define STMPE811_DIRECTION_IN
#define STMPE811_DIRECTION_OUT
#define STMPE811_TYPE_LEVEL
#define STMPE811_TYPE_EDGE
#define STMPE811_POLARITY_LOW
#define STMPE811_POLARITY_HIGH
#define STMPE811_EDGE_FALLING
#define STMPE811_EDGE_RISING
#define STMPE811_TS_CTRL_ENABLE
#define STMPE811_TS_CTRL_STATUS
stmpe811_Init(uint16_t);
stmpe811_Reset(uint16_t);
stmpe811_ReadID(uint16_t);
stmpe811_EnableGlobalIT(uint16_t);
stmpe811_DisableGlobalIT(uint16_t);
stmpe811_EnableITSource(uint16_t, uint8_t);
stmpe811_DisableITSource(uint16_t, uint8_t);
stmpe811_SetITPolarity(uint16_t, uint8_t);
stmpe811_SetITType(uint16_t, uint8_t);
stmpe811_GlobalITStatus(uint16_t, uint8_t);
stmpe811_ReadGITStatus(uint16_t, uint8_t);
stmpe811_ClearGlobalIT(uint16_t, uint8_t);
stmpe811_IO_Start(uint16_t, uint32_t);
stmpe811_IO_Config(uint16_t, uint32_t, IO_ModeTypedef);
stmpe811_IO_InitPin(uint16_t, uint32_t, uint8_t);
stmpe811_IO_EnableAF(uint16_t, uint32_t);
stmpe811_IO_DisableAF(uint16_t, uint32_t);
stmpe811_IO_SetEdgeMode(uint16_t, uint32_t, uint8_t);
stmpe811_IO_WritePin(uint16_t, uint32_t, uint8_t);
stmpe811_IO_ReadPin(uint16_t, uint32_t);
stmpe811_IO_EnableIT(uint16_t);
stmpe811_IO_DisableIT(uint16_t);
stmpe811_IO_EnablePinIT(uint16_t, uint32_t);
stmpe811_IO_DisablePinIT(uint16_t, uint32_t);
stmpe811_IO_ITStatus(uint16_t, uint32_t);
stmpe811_IO_ClearIT(uint16_t, uint32_t);
stmpe811_TS_Start(uint16_t);
stmpe811_TS_DetectTouch(uint16_t);
stmpe811_TS_GetXY(uint16_t, uint16_t *, uint16_t *);
stmpe811_TS_EnableIT(uint16_t);
stmpe811_TS_DisableIT(uint16_t);
stmpe811_TS_ITStatus(uint16_t);
stmpe811_TS_ClearIT(uint16_t);
IOE_Init();
IOE_ITConfig();
IOE_Delay(uint32_t);
IOE_Write(uint8_t, uint8_t, uint8_t);
IOE_Read(uint8_t, uint8_t);
IOE_ReadMultiple(uint8_t, uint8_t, uint8_t *, uint16_t);
stmpe811_ts_drv;
stmpe811_io_drv;
Files
loading...
SourceVuSTM32 Libraries and Samplesstmpe811stmpe811.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
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
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/** ****************************************************************************** * @file stmpe811.h * @author MCD Application Team * @brief This file contains all the functions prototypes for the * stmpe811.c IO expander driver. ****************************************************************************** * @attention * * Copyright (c) 2014 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. * ****************************************************************************** *//* ... */ /* Define to prevent recursive inclusion -------------------------------------*/ #ifndef __STMPE811_H #define __STMPE811_H #ifdef __cplusplus extern "C" { #endif /* Includes ------------------------------------------------------------------*/ #include "../Common/ts.h" #include "../Common/io.h" /** @addtogroup BSP * @{ *//* ... */ /** @addtogroup Components * @{ *//* ... */ /** @defgroup STMPE811 * @{ *//* ... */ /** @defgroup STMPE811_Exported_Types * @{ *//* ... */ /** * @} *//* ... */ /** @defgroup STMPE811_Exported_Constants * @{ *//* ... */ /* Chip IDs */ #define STMPE811_ID 0x0811 /* Identification registers & System Control */ #define STMPE811_REG_CHP_ID_LSB 0x00 #define STMPE811_REG_CHP_ID_MSB 0x01 #define STMPE811_REG_ID_VER 0x02 /* Global interrupt Enable bit */ #define STMPE811_GIT_EN 0x01 /* IO expander functionalities */ #define STMPE811_ADC_FCT 0x01 #define STMPE811_TS_FCT 0x02 #define STMPE811_IO_FCT 0x04 #define STMPE811_TEMPSENS_FCT 0x08 /* Global Interrupts definitions */ #define STMPE811_GIT_IO 0x80 /* IO interrupt */ #define STMPE811_GIT_ADC 0x40 /* ADC interrupt */ #define STMPE811_GIT_TEMP 0x20 /* Not implemented */ #define STMPE811_GIT_FE 0x10 /* FIFO empty interrupt */ #define STMPE811_GIT_FF 0x08 /* FIFO full interrupt */ #define STMPE811_GIT_FOV 0x04 /* FIFO overflowed interrupt */ #define STMPE811_GIT_FTH 0x02 /* FIFO above threshold interrupt */ #define STMPE811_GIT_TOUCH 0x01 /* Touch is detected interrupt */ #define STMPE811_ALL_GIT 0x1F /* All global interrupts */ #define STMPE811_TS_IT (STMPE811_GIT_TOUCH | STMPE811_GIT_FTH | STMPE811_GIT_FOV | STMPE811_GIT_FF | STMPE811_GIT_FE) /* Touch screen interrupts */ /* General Control Registers */ #define STMPE811_REG_SYS_CTRL1 0x03 #define STMPE811_REG_SYS_CTRL2 0x04 #define STMPE811_REG_SPI_CFG 0x08 /* Interrupt system Registers */ #define STMPE811_REG_INT_CTRL 0x09 #define STMPE811_REG_INT_EN 0x0A #define STMPE811_REG_INT_STA 0x0B #define STMPE811_REG_IO_INT_EN 0x0C #define STMPE811_REG_IO_INT_STA 0x0D /* IO Registers */ #define STMPE811_REG_IO_SET_PIN 0x10 #define STMPE811_REG_IO_CLR_PIN 0x11 #define STMPE811_REG_IO_MP_STA 0x12 #define STMPE811_REG_IO_DIR 0x13 #define STMPE811_REG_IO_ED 0x14 #define STMPE811_REG_IO_RE 0x15 #define STMPE811_REG_IO_FE 0x16 #define STMPE811_REG_IO_AF 0x17 /* ADC Registers */ #define STMPE811_REG_ADC_INT_EN 0x0E #define STMPE811_REG_ADC_INT_STA 0x0F #define STMPE811_REG_ADC_CTRL1 0x20 #define STMPE811_REG_ADC_CTRL2 0x21 #define STMPE811_REG_ADC_CAPT 0x22 #define STMPE811_REG_ADC_DATA_CH0 0x30 #define STMPE811_REG_ADC_DATA_CH1 0x32 #define STMPE811_REG_ADC_DATA_CH2 0x34 #define STMPE811_REG_ADC_DATA_CH3 0x36 #define STMPE811_REG_ADC_DATA_CH4 0x38 #define STMPE811_REG_ADC_DATA_CH5 0x3A #define STMPE811_REG_ADC_DATA_CH6 0x3B #define STMPE811_REG_ADC_DATA_CH7 0x3C /* Touch Screen Registers */ #define STMPE811_REG_TSC_CTRL 0x40 #define STMPE811_REG_TSC_CFG 0x41 #define STMPE811_REG_WDM_TR_X 0x42 #define STMPE811_REG_WDM_TR_Y 0x44 #define STMPE811_REG_WDM_BL_X 0x46 #define STMPE811_REG_WDM_BL_Y 0x48 #define STMPE811_REG_FIFO_TH 0x4A #define STMPE811_REG_FIFO_STA 0x4B #define STMPE811_REG_FIFO_SIZE 0x4C #define STMPE811_REG_TSC_DATA_X 0x4D #define STMPE811_REG_TSC_DATA_Y 0x4F #define STMPE811_REG_TSC_DATA_Z 0x51 #define STMPE811_REG_TSC_DATA_XYZ 0x52 #define STMPE811_REG_TSC_FRACT_XYZ 0x56 #define STMPE811_REG_TSC_DATA_INC 0x57 #define STMPE811_REG_TSC_DATA_NON_INC 0xD7 #define STMPE811_REG_TSC_I_DRIVE 0x58 #define STMPE811_REG_TSC_SHIELD 0x59 /* Touch Screen Pins definition */ #define STMPE811_TOUCH_YD STMPE811_PIN_7 #define STMPE811_TOUCH_XD STMPE811_PIN_6 #define STMPE811_TOUCH_YU STMPE811_PIN_5 #define STMPE811_TOUCH_XU STMPE811_PIN_4 #define STMPE811_TOUCH_IO_ALL (uint32_t)(STMPE811_TOUCH_YD | STMPE811_TOUCH_XD | STMPE811_TOUCH_YU | STMPE811_TOUCH_XU) /* IO Pins definition */ #define STMPE811_PIN_0 0x01 #define STMPE811_PIN_1 0x02 #define STMPE811_PIN_2 0x04 #define STMPE811_PIN_3 0x08 #define STMPE811_PIN_4 0x10 #define STMPE811_PIN_5 0x20 #define STMPE811_PIN_6 0x40 #define STMPE811_PIN_7 0x80 #define STMPE811_PIN_ALL 0xFF /* IO Pins directions */ #define STMPE811_DIRECTION_IN 0x00 #define STMPE811_DIRECTION_OUT 0x01 /* IO IT types */ #define STMPE811_TYPE_LEVEL 0x00 #define STMPE811_TYPE_EDGE 0x02 /* IO IT polarity */ #define STMPE811_POLARITY_LOW 0x00 #define STMPE811_POLARITY_HIGH 0x04 /* IO Pin IT edge modes */ #define STMPE811_EDGE_FALLING 0x01 #define STMPE811_EDGE_RISING 0x02 /* TS registers masks */ #define STMPE811_TS_CTRL_ENABLE 0x01 #define STMPE811_TS_CTRL_STATUS 0x80 90 defines/** * @} *//* ... */ /** @defgroup STMPE811_Exported_Macros * @{ *//* ... */ /** * @} *//* ... */ /** @defgroup STMPE811_Exported_Functions * @{ *//* ... */ /** * @brief STMPE811 Control functions *//* ... */ void stmpe811_Init(uint16_t DeviceAddr); void stmpe811_Reset(uint16_t DeviceAddr); uint16_t stmpe811_ReadID(uint16_t DeviceAddr); void stmpe811_EnableGlobalIT(uint16_t DeviceAddr); void stmpe811_DisableGlobalIT(uint16_t DeviceAddr); void stmpe811_EnableITSource(uint16_t DeviceAddr, uint8_t Source); void stmpe811_DisableITSource(uint16_t DeviceAddr, uint8_t Source); void stmpe811_SetITPolarity(uint16_t DeviceAddr, uint8_t Polarity); void stmpe811_SetITType(uint16_t DeviceAddr, uint8_t Type); uint8_t stmpe811_GlobalITStatus(uint16_t DeviceAddr, uint8_t Source); uint8_t stmpe811_ReadGITStatus(uint16_t DeviceAddr, uint8_t Source); void stmpe811_ClearGlobalIT(uint16_t DeviceAddr, uint8_t Source); /** * @brief STMPE811 IO functionalities functions *//* ... */ void stmpe811_IO_Start(uint16_t DeviceAddr, uint32_t IO_Pin); uint8_t stmpe811_IO_Config(uint16_t DeviceAddr, uint32_t IO_Pin, IO_ModeTypedef IO_Mode); void stmpe811_IO_InitPin(uint16_t DeviceAddr, uint32_t IO_Pin, uint8_t Direction); void stmpe811_IO_EnableAF(uint16_t DeviceAddr, uint32_t IO_Pin); void stmpe811_IO_DisableAF(uint16_t DeviceAddr, uint32_t IO_Pin); void stmpe811_IO_SetEdgeMode(uint16_t DeviceAddr, uint32_t IO_Pin, uint8_t Edge); void stmpe811_IO_WritePin(uint16_t DeviceAddr, uint32_t IO_Pin, uint8_t PinState); uint32_t stmpe811_IO_ReadPin(uint16_t DeviceAddr, uint32_t IO_Pin); void stmpe811_IO_EnableIT(uint16_t DeviceAddr); void stmpe811_IO_DisableIT(uint16_t DeviceAddr); void stmpe811_IO_EnablePinIT(uint16_t DeviceAddr, uint32_t IO_Pin); void stmpe811_IO_DisablePinIT(uint16_t DeviceAddr, uint32_t IO_Pin); uint32_t stmpe811_IO_ITStatus(uint16_t DeviceAddr, uint32_t IO_Pin); void stmpe811_IO_ClearIT(uint16_t DeviceAddr, uint32_t IO_Pin); /** * @brief STMPE811 Touch screen functionalities functions *//* ... */ void stmpe811_TS_Start(uint16_t DeviceAddr); uint8_t stmpe811_TS_DetectTouch(uint16_t DeviceAddr); void stmpe811_TS_GetXY(uint16_t DeviceAddr, uint16_t *X, uint16_t *Y); void stmpe811_TS_EnableIT(uint16_t DeviceAddr); void stmpe811_TS_DisableIT(uint16_t DeviceAddr); uint8_t stmpe811_TS_ITStatus (uint16_t DeviceAddr); void stmpe811_TS_ClearIT (uint16_t DeviceAddr); void IOE_Init(void); void IOE_ITConfig (void); void IOE_Delay(uint32_t delay); void IOE_Write(uint8_t addr, uint8_t reg, uint8_t value); uint8_t IOE_Read(uint8_t addr, uint8_t reg); uint16_t IOE_ReadMultiple(uint8_t addr, uint8_t reg, uint8_t *buffer, uint16_t length); /* Touch screen driver structure */ extern TS_DrvTypeDef stmpe811_ts_drv; /* IO driver structure */ extern IO_DrvTypeDef stmpe811_io_drv; #ifdef __cplusplus }extern "C" { ... } #endif/* ... */ #endif /* __STMPE811_H */ /** * @} *//* ... */ /** * @} *//* ... */ /** * @} *//* ... */ /** * @} *//* ... */
Details
Show:
from
Types: Columns:
This file uses the notable symbols shown below. Click anywhere in the file to view more details.