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 |
ZTW622Constants.h (4494B)
1 #pragma once 2 3 #define ZTW622_SLAVE_ADDRESS (0x20) 4 5 /*2. Register Map一些寄存器的定义,用户不需修改,直接使用就可以了*/ 6 #define ZINITIX_SWRESET_CMD ((uint16_t)0x0000) 7 #define ZINITIX_WAKEUP_CMD ((uint16_t)0x0001) 8 9 #define ZINITIX_CLEAR_INT_CMD ((uint16_t)0x0003) 10 #define ZINITIX_IDLE_CMD ((uint16_t)0x0004) 11 #define ZINITIX_SLEEP_CMD ((uint16_t)0x0005) 12 #define ZINITIX_CLEAR_INT_STATUS_CMD ((uint16_t)0x0003) 13 #define ZINITIX_CALIBRATE_CMD ((uint16_t)0x0006) 14 #define ZINITIX_SAVE_STATUS_CMD ((uint16_t)0x0007) 15 #define ZINITIX_SAVE_CALIBRATION_CMD ((uint16_t)0x0008) 16 #define ZINITIX_RECALL_FACTORY_CMD ((uint16_t)0x000f) 17 #define ZINITIX_SENSITIVITY ((uint16_t)0x0020) 18 #define ZINITIX_I2C_CHECKSUM_WCNT ((uint16_t)0x016a) 19 #define ZINITIX_I2C_CHECKSUM_RESULT ((uint16_t)0x016c) 20 #define ZINITIX_DEBUG_REG ((uint16_t)0x0115) // 0~7 21 #define ZINITIX_TOUCH_MODE ((uint16_t)0x0010) 22 #define ZINITIX_CHIP_REVISION ((uint16_t)0x0011) 23 #define ZINITIX_FIRMWARE_VERSION ((uint16_t)0x0012) 24 #define ZINITIX_MINOR_FW_VERSION ((uint16_t)0x0121) 25 #define ZINITIX_DATA_VERSION_REG ((uint16_t)0x0013) 26 #define ZINITIX_HW_ID ((uint16_t)0x0014) 27 #define ZINITIX_SUPPORTED_FINGER_NUM ((uint16_t)0x0015) 28 #define ZINITIX_EEPROM_INFO ((uint16_t)0x0018) 29 #define ZINITIX_INITIAL_TOUCH_MODE ((uint16_t)0x0019) 30 #define ZINITIX_TOTAL_NUMBER_OF_X ((uint16_t)0x0060) 31 #define ZINITIX_TOTAL_NUMBER_OF_Y ((uint16_t)0x0061) 32 #define ZINITIX_DELAY_RAW_FOR_HOST ((uint16_t)0x007f) 33 #define ZINITIX_BUTTON_SUPPORTED_NUM ((uint16_t)0x00B0) 34 #define ZINITIX_BUTTON_SENSITIVITY ((uint16_t)0x00B2) 35 #define ZINITIX_X_RESOLUTION ((uint16_t)0x00C0) 36 #define ZINITIX_Y_RESOLUTION ((uint16_t)0x00C1) 37 #define ZINITIX_POINT_STATUS_REG ((uint16_t)0x0080) 38 #define ZINITIX_ICON_STATUS_REG ((uint16_t)0x00AA) 39 #define ZINITIX_AFE_FREQUENCY ((uint16_t)0x0100) 40 #define ZINITIX_DND_N_COUNT ((uint16_t)0x0122) 41 #define ZINITIX_RAWDATA_REG ((uint16_t)0x0200) 42 #define ZINITIX_EEPROM_INFO_REG ((uint16_t)0x0018) 43 #define ZINITIX_INT_ENABLE_FLAG ((uint16_t)0x00f0) 44 #define ZINITIX_PERIODICAL_INTERRUPT_INTERVAL ((uint16_t)0x00f1) 45 #define ZINITIX_CHECKSUM_RESULT ((uint16_t)0x012c) 46 #define ZINITIX_INIT_FLASH ((uint16_t)0x01d0) 47 #define ZINITIX_WRITE_FLASH ((uint16_t)0x01d1) 48 #define ZINITIX_READ_FLASH ((uint16_t)0x01d2) 49 #define ZINITIX_POINTS_REG \ 50 { 0x0084, 0x008a, 0x0090, 0x0096, 0x009c } 51 52 #define BIT_DOWN 1 53 #define BIT_MOVE 2 54 #define BIT_UP 3 55 #define BIT_PALM 4 56 #define BIT_PALM_REJECT 5 57 #define BIT_WAKEUP 6 58 #define RESERVED_1 7 59 #define BIT_WEIGHT_CHANGE 8 60 #define BIT_PT_NO_CHANGE 9 61 #define BIT_REJECT 10 62 #define BIT_PT_EXIST 11 63 #define RESERVED_2 12 64 #define BIT_MUST_ZERO 13 65 #define BIT_DEBUG 14 66 #define BIT_ICON_EVENT 15 67 68 /* Status Register LOW */ 69 #define BIT_POINT_COUNT_CHANGE _BV(0) 70 #define BIT_POINT_DOWN _BV(1) 71 #define BIT_POINT_MOVE _BV(2) 72 #define BIT_POINT_UP _BV(3) 73 #define BIT_RESERVED04 _BV(4) 74 #define BIT_PALM_REPORT_GESTURE _BV(5) 75 #define BIT_WAKE_UP _BV(6) 76 #define BIT_RESERVED07 _BV(7) 77 /* Status Register HIGH */ 78 #define BIT_RESERVED08 _BV(0) 79 #define BIT_RESERVED09 _BV(1) 80 #define BIT_RESERVED10 _BV(2) 81 #define BIT_POINT_DETECTED _BV(3) 82 #define BIT_RESERVED12 _BV(4) 83 #define BIT_MUST_ZERO _BV(5) 84 #define BIT_DEBUG _BV(6) 85 #define BIT_BUTTON_INFO _BV(7) 86 87 #define SUB_BIT_EXIST 0 88 #define SUB_BIT_DOWN 1 89 #define SUB_BIT_MOVE 2 90 #define SUB_BIT_UP 3 91 #define SUB_BIT_UPDATE 4 92 #define SUB_BIT_WAIT 5