acid-drop- Hacking the planet from a LilyGo T-Deck using custom firmware |
git clone git://git.acid.vegas/acid-drop.git |
Log | Files | Refs | Archive | README | LICENSE |
CSTSelfConstants.h (2877B)
1 #pragma once 2 3 #define CTS826_SLAVE_ADDRESS (0X15) 4 #define CTS820_SLAVE_ADDRESS (0X15) 5 #define CTS816S_SLAVE_ADDRESS (0X15) 6 7 /* Working mode switching command */ 8 // Normal reporting and gesture reporting 9 #define NOMAL_CMD_REG ((uint16_t)0x0000) 10 // Factory test data acquisition 11 #define DBG_IDAC_CMD_REG ((uint16_t)0x0004) 12 // Factory test button and coordinate acquisition 13 #define DBG_POS_CMD_REG ((uint16_t)0x00E0) 14 // Get the original value 15 #define DBG_RAW_CMD_REG ((uint16_t)0x0006) 16 // get the differ value 17 #define DBG_SIG_CMD_REG ((uint16_t)0x0007) 18 19 /* NOMAL register description */ 20 /* 21 Write: 00: NOMAL 22 04: DBG_IDAC 23 E0: DBG_POS 24 06: DBG_RAW 25 07: DBG_SIG 26 */ 27 #define WORK_MODE_REG ((uint8_t)0x00) 28 /* 29 default:00 30 far away:C0 31 near:E0 32 */ 33 #define PROXIMITY_ID_REG ((uint8_t)0x01) 34 35 /* 36 BIT 7 ~ BIT 4: 37 BIT 3 ~ BIT 0: touch points[3:0] 38 */ 39 #define TOUCH_NUM_REG ((uint8_t)0x02) 40 41 /* 42 BIT 7 ~ BIT 6: event_flg 43 BIT 5 ~ BIT 4: 44 BIT 3 ~ BIT 0: X_position[11:8] 45 */ 46 #define TOUCH1_XH_REG ((uint8_t)0x03) 47 /* 48 BIT 7 ~ BIT 0: X_position[7:0] 49 */ 50 #define TOUCH1_XL_REG ((uint8_t)0x04) 51 /* 52 BIT 7 ~ BIT 4: touch_ID[3:0] 53 BIT 3 ~ BIT 0: Y_position[11:8] 54 */ 55 #define TOUCH1_YH_REG ((uint8_t)0x05) 56 /* 57 BIT 7 ~ BIT 0: Y_position[7:0] 58 */ 59 #define TOUCH1_YL_REG ((uint8_t)0x06) 60 /* 61 BIT 7 ~ BIT 6: event_flg 62 BIT 5 ~ BIT 4: 63 BIT 3 ~ BIT 0: X_position[11:8] 64 */ 65 #define TOUCH2_XH_REG ((uint8_t)0x09) 66 /* 67 BIT 7 ~ BIT 0: X_position[7:0] 68 */ 69 #define TOUCH2_XL_REG ((uint8_t)0x10) 70 /* 71 BIT 7 ~ BIT 4: touch_ID[3:0] 72 BIT 3 ~ BIT 0: Y_position[11:8] 73 */ 74 #define TOUCH2_YH_REG ((uint8_t)0x11) 75 /* 76 BIT 7 ~ BIT 0: Y_position[7:0] 77 */ 78 #define TOUCH2_YL_REG ((uint8_t)0x12) 79 /* 80 BIT 7 ~ BIT 0: deepsleep[7:0] write 0X03 into deepsleep 81 */ 82 #define SLEEP_REG ((uint8_t)0xA5) 83 /* 84 Firmware version number 85 */ 86 #define FW_VERSION_0_7_REG ((uint8_t)0xA6) 87 #define FW_VERSION_8_15_REG ((uint8_t)0xA7) 88 89 #define MODULE_ID_REG ((uint8_t)0xA8) 90 #define PROJECT_NAME_REG ((uint8_t)0xA9) 91 #define CHIP_TYPE_0_7_REG ((uint8_t)0xAA) 92 #define CHIP_TYPE_8_15_REG ((uint8_t)0xAB) 93 #define CHECKSUM_0_7_REG ((uint8_t)0xAC) 94 #define CHECKSUM_8_15_REG ((uint8_t)0xAD) 95 /* 96 write 97 01H enter Proximity mode 98 00H exit Proximity mode 99 */ 100 #define PROX_STATE_REG ((uint8_t)0xB0) 101 /* 102 write 103 01H Enter gesture recognition mode 104 00H Exit gesture mode 105 */ 106 #define GES_STATE_REG ((uint8_t)0xD0) 107 /* 108 Gesture mode is enabled to be effective 109 double click: 0x24 110 up: 0x22 111 down: 0x23 112 left: 0x20 113 rignt: 0x21 114 C: 0x34 115 e:0x33 116 m:0x32 117 O: 0x30 118 S: 0x46 119 V: 0x54 120 W: 0x31 121 Z:0x65 122 */ 123 #define GESTURE_ID_REG ((uint8_t)0xD3)