• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2020-2021 Huawei Device Co., Ltd.
3  *
4  * HDF is dual licensed: you can use it either under the terms of
5  * the GPL, or the BSD license, at your option.
6  * See the LICENSE file in the root of this repository for complete details.
7  */
8 
9 #ifndef TOUCH_FT6236_H
10 #define TOUCH_FT6236_H
11 
12 /* register address */
13 #define FTS_REG_POINT_RATE    0x88    // report rate
14 #define FTS_REG_FW_VER        0xA6    // FW version
15 #define FTS_REG_CHIP_ID       0xA3    // Chip ID
16 #define FTS_REG_VENDOR_ID     0xA8    // TP vendor ID
17 
18 /* the config for parsing event buffer */
19 #define HALF_BYTE_MASK 0x0F
20 #define HALF_BYTE_OFFSET   4
21 #define SIX_BIT_OFFSET     6
22 #define ONE_BYTE_OFFSET    8
23 
24 /* read data buffer len */
25 /* head info occupy 3byte (Mode Switch, reserved, TD_status--point num),
26  * each point info occupy 6 bytes.
27  */
28 #define POINT_BUFFER_LEN (FT_POINT_SIZE * MAX_SUPPORT_POINT + 3)
29 /* the FT6236 driver ic can support 2 points */
30 #define MAX_SUPPORT_POINT 2
31 /* buffer size of one event */
32 #define FT_POINT_SIZE     6
33 /* point data position */
34 #define FT_POINT_NUM_POS  2
35 #define FT_EVENT_POS      3
36 #define FT_X_H_POS        3
37 #define FT_X_L_POS        4
38 #define FT_Y_H_POS        5
39 #define FT_FINGER_POS     5
40 #define FT_Y_L_POS        6
41 
42 #endif
43