blob: 19a47b06d8f5580437769a0de7384425ff357b3c (
plain)
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
|
/*
**************************************************************************
** STMicroelectronics **
**************************************************************************
** marco.cali@st.com **
**************************************************************************
* *
* FTS Gesture Utilities *
* *
**************************************************************************
**************************************************************************
*/
#include <linux/types.h>
#define GESTURE_MASK_SIZE 8
#define GESTURE_CUSTOM_POINTS (30*2)
/* for each custom gesture should be provided 30 points (each point is a couple of x,y) */
#define GESTURE_CUSTOM_NUMBER 5 /* fw support up to 5 custom gestures */
#define TEMPLATE_CHUNK (10*2)
/* number of points to transfer with each I2C transaction */
/* Gesture IDs */
#define GES_ID_DBLTAP 0x01 /* Double Tap */
#define GES_ID_O 0x02 /* 'O' */
#define GES_ID_C 0x03 /* 'C' */
#define GES_ID_M 0x04 /* 'M' */
#define GES_ID_W 0x05 /* 'W' */
#define GES_ID_E 0x06 /* 'e' */
#define GES_ID_HFLIP_L2R 0x07 /* Left to right line */
#define GES_ID_HFLIP_R2L 0x08 /* Right to left line */
#define GES_ID_VFLIP_T2D 0x09 /* Top to bottom line */
#define GES_ID_VFLIP_D2T 0x0A /* Bottom to Top line */
#define GES_ID_L 0x0B /* 'L' */
#define GES_ID_F 0x0C /* 'F' */
#define GES_ID_V 0x0D /* 'V' */
#define GES_ID_AT 0x0E /* '@' */
#define GES_ID_S 0x0F /* 'S' */
#define GES_ID_Z 0x10 /* 'Z' */
#define GES_ID_CUST1 0x11 /* Custom gesture 1 */
#define GES_ID_CUST2 0x12 /* Custom gesture 2 */
#define GES_ID_CUST3 0x13 /* Custom gesture 3 */
#define GES_ID_CUST4 0x14 /* Custom gesture 4 */
#define GES_ID_CUST5 0x15 /* Custom gesture 5 */
#define GES_ID_LEFTBRACE 0x20 /* '<' */
#define GES_ID_RIGHTBRACE 0x21 /* '>' */
#define GESTURE_CUSTOM_OFFSET GES_ID_CUST1
/* Command sub-type */
#define GESTURE_ENABLE 0x01
#define GESTURE_DISABLE 0x02
#define GESTURE_ENB_CHECK 0x03
#define GESTURE_START_ADD 0x10
#define GESTURE_DATA_ADD 0x11
#define GESTURE_FINISH_ADD 0x12
#define GETURE_REMOVE_CUSTOM 0x13
#define GESTURE_CHECK_CUSTOM 0x14
/* Event sub-type */
#define EVENT_TYPE_ENB 0x04
#define EVENT_TYPE_CHECK_ENB 0x03
#define EVENT_TYPE_GESTURE_DTC1 0x01
#define EVENT_TYPE_GESTURE_DTC2 0x02
int disableGesture(u8 *mask, int size);
int enableGesture(u8 *mask, int size);
int startAddCustomGesture(u8 gestureID);
int finishAddCustomGesture(u8 gestureID);
int loadCustomGesture(u8 *template, u8 gestureID);
int reloadCustomGesture(void);
int enterGestureMode(int reload);
|