1 #ifndef __LINUX_FT5X0X_TS_H__
2 #define __LINUX_FT5X0X_TS_H__
4 //#define CONFIG_SUPPORT_FTS_CTP_UPG
5 #define CONFIG_FTS_CUSTOME_ENV
7 #define CFG_DBG_DUMMY_INFO_SUPPORT 1 //output touch point information
8 #define CFG_DBG_FUCTION_INFO_SUPPORT 0 //output fouction name
9 #define CFG_DBG_INPUT_EVENT 0 //debug input event
12 #define CFG_MAX_POINT_NUM 0x5 //max touch points supported
13 #define CFG_NUMOFKEYS 0x4 //number of touch keys
15 #ifdef CONFIG_FTS_CUSTOME_ENV
16 #define SCREEN_MAX_X 1044//1024
17 #define SCREEN_MAX_Y 620//600
19 #define SCREEN_MAX_X 800
20 #define SCREEN_MAX_Y 480
25 #define KEY_RELEASE 0x0
27 #define FT5X0X_NAME "laibao_touch"//"ft5x0x_ts"
32 #define I2C_CTPM_ADDRESS 0x70
34 typedef unsigned char FTS_BYTE;
35 typedef unsigned short FTS_WORD;
36 typedef unsigned int FTS_DWRD;
37 typedef unsigned char FTS_BOOL;
41 typedef struct _REPORT_FINGER_INFO_T
43 short ui2_id; /* ID information, from 0 to CFG_MAX_POINT_NUM - 1*/
44 short u2_pressure; /* ***pressure information, valid from 0 -63 **********/
45 short i2_x; /*********** X coordinate, 0 - 2047 ****************/
46 short i2_y; /* **********Y coordinate, 0 - 2047 ****************/
47 } REPORT_FINGER_INFO_T;
64 struct FTS_TS_EVENT_T {
87 FT5X0X_REG_THRES = 0x80, /* Thresshold, the threshold be low, the sensitivy will be high */
88 FT5X0X_REG_REPORT_RATE = 0x88, /* **************report rate, in unit of 10Hz **************/
89 FT5X0X_REG_PMODE = 0xA5, /* Power Consume Mode 0 -- active, 1 -- monitor, 3 -- sleep */
90 FT5X0X_REG_FIRMID = 0xA6, /* ***************firmware version **********************/
91 FT5X0X_REG_NOISE_MODE = 0xb2 /* to enable or disable power noise, 1 -- enable, 0 -- disable */
94 #define PMODE_ACTIVE 0x00
95 #define PMODE_MONITOR 0x01
96 #define PMODE_STANDBY 0x02
97 #define PMODE_HIBERNATE 0x03
100 #ifndef ABS_MT_TOUCH_MAJOR
101 #define ABS_MT_TOUCH_MAJOR 0x30 /* touching ellipse */
102 #define ABS_MT_TOUCH_MINOR 0x31 /* (omit if circular) */
103 #define ABS_MT_WIDTH_MAJOR 0x32 /* approaching ellipse */
104 #define ABS_MT_WIDTH_MINOR 0x33 /* (omit if circular) */
105 #define ABS_MT_ORIENTATION 0x34 /* Ellipse orientation */
106 #define ABS_MT_POSITION_X 0x35 /* Center X ellipse position */
107 #define ABS_MT_POSITION_Y 0x36 /* Center Y ellipse position */
108 #define ABS_MT_TOOL_TYPE 0x37 /* Type of touching device */
109 #define ABS_MT_BLOB_ID 0x38 /* Group set of pkts as blob */