PIC software documentation
Main Page
Modules
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Enumerations
Enumerator
Groups
ft5x06
src
ft5x06.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2013 Andreas Misje
3
*
4
* This program is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation, either version 3 of the License, or
7
* (at your option) any later version.
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16
*/
17
39
#ifndef FT5X06_H
40
#define FT5X06_H
41
45
#define FT5X06_I2C_ADDR 0x38
46
54
enum
ft5x06_gesture
{
56
FT5X06_GESTURE_none
= 0x00,
58
FT5X06_GESTURE_up
= 0x10,
60
FT5X06_GESTURE_left
= 0x14,
62
FT5X06_GESTURE_down
= 0x18,
64
FT5X06_GESTURE_right
= 0x1c,
66
FT5X06_GESTURE_zoomIn
= 0x48,
68
FT5X06_GESTURE_zoomOut
= 0x49,
69
};
70
74
enum
ft5x06_touchEvent
75
{
77
FT5X06_EVENT_putDown
= 0,
85
FT5X06_EVENT_putUp
= 1,
87
FT5X06_EVENT_contact
= 2,
89
FT5X06_EVENT_invalid
= 3,
90
};
91
101
struct
touchCoor
102
{
104
unsigned
int
x
;
106
unsigned
int
y
;
108
enum
ft5x06_touchEvent
event
;
109
};
110
118
struct
touchInfo
119
{
121
unsigned
char
gesture
;
123
unsigned
char
numPoints
;
130
struct
touchCoor
points
[ 5 ];
131
};
132
140
void
ft5x06_queryTouchInfo
(
int
numPoints );
141
145
enum
ft5x06_retrieveTouchInfoRetVal
146
{
148
FT5X06_RETTOUCH_OK
= 0,
153
FT5X06_RETTOUCH_ERR_I2C_ERROR
= 1,
155
FT5X06_RETTOUCH_NULL_ARG
= 2,
160
FT5X06_RETTOUCH_ERR_NUM_POINTS
= 3,
162
FT5X06_RETTOUCH_ERR_EVENT
= 4,
163
};
164
176
int
ft5x06_retrieveTouchInfo
(
struct
touchInfo
*
touchInfo
);
177
178
#endif // FT5X06_H
179
Generated on Fri Jul 19 2013 17:11:24 for PIC software documentation by
1.8.1.2