Out-of-office display, GFX
Main Page
Modules
Classes
Files
Examples
File List
File Members
All
Classes
Files
Functions
Variables
Enumerations
Enumerator
Groups
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
25
#ifndef _FT5X06_H
26
#define _FT5X06_H
27
31
#define FT5X06_I2C_ADDR 0x38
32
40
enum
ft5x06_gesture
{
42
FT5X06_GESTURE_none
= 0x00,
44
FT5X06_GESTURE_up
= 0x10,
46
FT5X06_GESTURE_left
= 0x14,
48
FT5X06_GESTURE_down
= 0x18,
50
FT5X06_GESTURE_right
= 0x1c,
52
FT5X06_GESTURE_zoomIn
= 0x48,
54
FT5X06_GESTURE_zoomOut
= 0x49,
55
};
56
60
enum
ft5x06_touchEvent
61
{
63
FT5X06_EVENT_putDown
= 0,
71
FT5X06_EVENT_putUp
= 1,
73
FT5X06_EVENT_contact
= 2,
75
FT5X06_EVENT_invalid
= 3,
76
};
77
87
struct
touchCoor
88
{
90
unsigned
int
x
;
92
unsigned
int
y
;
94
enum
ft5x06_touchEvent
event
;
95
};
96
104
struct
touchInfo
105
{
107
unsigned
char
gesture
;
109
unsigned
char
numPoints
;
116
struct
touchCoor
points
[ 5 ];
117
};
118
126
void
ft5x06_queryTouchInfo
(
int
numPoints );
127
131
enum
ft5x06_retrieveTouchInfoRetVal
132
{
134
/* 0 */
FT5X06_RETTOUCH_OK
,
139
/* 1 */
FT5X06_RETTOUCH_ERR_I2C_ERROR
,
141
/* 2 */
FT5X06_RETTOUCH_NULL_ARG
,
146
/* 3 */
FT5X06_RETTOUCH_ERR_NUM_POINTS
,
148
/* 4 */
FT5X06_RETTOUCH_ERR_EVENT
,
149
};
150
162
int
ft5x06_retrieveTouchInfo
(
struct
touchInfo
*
touchInfo
);
163
164
#endif // _FT5X06_H
165
Generated on Mon Jul 8 2013 01:04:59 for Out-of-office display, GFX by
1.8.1.2