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
36
37
40
41
44
45
48
49
55
58
59
62
63
64
65
66
67
68
73
76
77
80
81
82
83
84
85
86
89
90
93
94
97
98
101
102
103
104
105
106
/* ... */
#ifndef __STM324xG_EVAL_TS_H
#define __STM324xG_EVAL_TS_H
#ifdef __cplusplus
extern "C" {
#endif
#include "stm324xg_eval.h"
#include "../Components/stmpe811/stmpe811.h"
/* ... */
/* ... */
/* ... */
/* ... */
typedef struct
{
uint16_t TouchDetected;
uint16_t x;
uint16_t y;
uint16_t z;
...}TS_StateTypeDef;
/* ... */
/* ... */
#define TS_SWAP_NONE 0x00
#define TS_SWAP_X 0x01
#define TS_SWAP_Y 0x02
#define TS_SWAP_XY 0x04
typedef enum
{
TS_OK = 0x00,
TS_ERROR = 0x01,
TS_TIMEOUT = 0x02
...}TS_StatusTypeDef;
/* ... */
/* ... */
uint8_t BSP_TS_Init(uint16_t xSize, uint16_t ySize);
uint8_t BSP_TS_GetState(TS_StateTypeDef *TS_State);
uint8_t BSP_TS_ITConfig(void);
uint8_t BSP_TS_ITGetStatus(void);
void BSP_TS_ITClear(void);
/* ... */
/* ... */
/* ... */
/* ... */
#ifdef __cplusplus
}extern "C" { ... }
#endif
/* ... */
#endif