[processor-sdk/performance-audio-sr.git] / psdk_cust / pdk_k2g_1_0_1_1_eng / packages / ti / board / diag / lcd_touchscreen / include / lcd_touchscreen.h
1 /**
2 * ============================================================================
3 * @n (C) Copyright 2015, Texas Instruments, Inc.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 *
12 * Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the
15 * distribution.
16 *
17 * Neither the name of Texas Instruments Incorporated nor the names of
18 * its contributors may be used to endorse or promote products derived
19 * from this software without specific prior written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 *
33 */
35 //touch screen controller registers
36 //FT5506
37 #define TOUCH_SLAVE_ADDR (0x38)
39 #define DEVICE_MODE (0x00) // device mode
40 #define GEST_ID (0x01) // gesture id
41 #define TD_STATUS (0x02) // touch points
43 #define TOUCH1_XH (0x03)
44 #define TOUCH1_XL (0x04)
45 #define TOUCH1_YH (0x05)
46 #define TOUCH1_YL (0x06)
48 #define TOUCH2_XH (0x09)
49 #define TOUCH2_XL (0x0a)
50 #define TOUCH2_YH (0x0b)
51 #define TOUCH2_YL (0x0c)
53 #define TOUCH3_XH (0x0f)
54 #define TOUCH3_XL (0x10)
55 #define TOUCH3_YH (0x11)
56 #define TOUCH3_YL (0x12)
58 #define TOUCH4_XH (0x15)
59 #define TOUCH4_XL (0x16)
60 #define TOUCH4_YH (0x17)
61 #define TOUCH4_YL (0x18)
63 #define TOUCH5_XH (0x1b)
64 #define TOUCH5_XL (0x1c)
65 #define TOUCH5_YH (0x1d)
66 #define TOUCH5_YL (0x1e)
68 #define TOUCH6_XH (0x21)
69 #define TOUCH6_XL (0x22)
70 #define TOUCH6_YH (0x23)
71 #define TOUCH6_YL (0x24)
73 #define TOUCH7_XH (0x27)
74 #define TOUCH7_XL (0x28)
75 #define TOUCH7_YH (0x29)
76 #define TOUCH7_YL (0x2a)
78 #define TOUCH8_XH (0x2d)
79 #define TOUCH8_XL (0x2e)
80 #define TOUCH8_YH (0x2f)
81 #define TOUCH8_YL (0x30)
83 #define TOUCH9_XH (0x33)
84 #define TOUCH9_XL (0x34)
85 #define TOUCH9_YH (0x35)
86 #define TOUCH9_YL (0x36)
88 #define TOUCH10_XH (0x39)
89 #define TOUCH10_XL (0x40)
90 #define TOUCH10_YH (0x41)
91 #define TOUCH10_YL (0x42)
93 #define ID_G_THGROUP (0x80) // valid touching detect threshold
94 #define ID_G_THPEAK (0x81) // valid touching peak detect threshold
95 #define ID_G_THCAL (0x82) // the threshold when calculating the focus of touching
96 #define ID_G_THWATER (0x83) // the threshold when there is surface water
97 #define ID_G_TEMP (0x84) // the threshold of temperature compensation
98 #define ID_G_THDIFF (0x85) // the threshold whether the coordinate is different from original
99 #define ID_G_CTRL (0x86) //
100 #define ID_G_TIME_ENTER_MONITOR (0x87) // the timer for entering monitor status
101 #define ID_G_PERIODACTIVE (0x88) //2
102 #define ID_G_PERIODMONITOR (0x89) // the timer of entering idle when in monitor status
103 #define ID_G_AUTO_CLB_MODE (0xa0) // auto calibration mode
104 #define ID_G_LIB_VERSION_H (0xa1) // Firmware Library Version H byte
105 #define ID_G_LIB_VERSION_L (0xa2) // Firmware Library Version L byte
106 #define ID_G_CIPHER (0xa3) // Chip vendor ID
107 #define ID_G_MODE (0xa4) // the interrupt status to host
108 #define ID_G_PMODE (0xa5) // Power Consume Mode
109 #define ID_G_FIRMID (0xa6) // Firmware ID
110 #define ID_G_STATE (0xa7) // Running State
111 #define ID_G_FT5201ID (0xa8) // CTPM Vendor ID
112 #define ID_G_ERR (0xa9) // Error Code
113 #define ID_G_CLB (0xaa) // Configure TP module during calibration in Test Mode
114 #define ID_G_B_AREA_TH (0xae) // The threshold of big area
115 #define LOG_MSG_CNT (0xfe) // The log M SG count
116 #define LOG_CUR_CHA (0xff) // Current character of log message
118 #define NORMAL_OPMODE (0x00)
119 #define SYSINFO_MODE (0x10)
120 #define TEST_MODE (0x40)