^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) Elantech Touchpad Driver
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) ========================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) Copyright (C) 2007-2008 Arjan Opmeer <arjan@opmeer.net>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) Extra information for hardware version 1 found and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) provided by Steve Havelka
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) Version 2 (EeePC) hardware support based on patches
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) received from Woody at Xandros and forwarded to me
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) by user StewieGriffin at the eeeuser.com forum
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) .. Contents
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) 1. Introduction
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) 2. Extra knobs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) 3. Differentiating hardware versions
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) 4. Hardware version 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) 4.1 Registers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) 4.2 Native relative mode 4 byte packet format
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) 4.3 Native absolute mode 4 byte packet format
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) 5. Hardware version 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) 5.1 Registers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) 5.2 Native absolute mode 6 byte packet format
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) 5.2.1 Parity checking and packet re-synchronization
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) 5.2.2 One/Three finger touch
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) 5.2.3 Two finger touch
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) 6. Hardware version 3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) 6.1 Registers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) 6.2 Native absolute mode 6 byte packet format
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) 6.2.1 One/Three finger touch
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) 6.2.2 Two finger touch
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) 7. Hardware version 4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) 7.1 Registers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) 7.2 Native absolute mode 6 byte packet format
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) 7.2.1 Status packet
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) 7.2.2 Head packet
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) 7.2.3 Motion packet
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) 8. Trackpoint (for Hardware version 3 and 4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) 8.1 Registers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) 8.2 Native relative mode 6 byte packet format
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) 8.2.1 Status Packet
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) Introduction
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) ~~~~~~~~~~~~
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) Currently the Linux Elantech touchpad driver is aware of four different
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) hardware versions unimaginatively called version 1,version 2, version 3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) and version 4. Version 1 is found in "older" laptops and uses 4 bytes per
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) packet. Version 2 seems to be introduced with the EeePC and uses 6 bytes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) per packet, and provides additional features such as position of two fingers,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) and width of the touch. Hardware version 3 uses 6 bytes per packet (and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) for 2 fingers the concatenation of two 6 bytes packets) and allows tracking
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) of up to 3 fingers. Hardware version 4 uses 6 bytes per packet, and can
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) combine a status packet with multiple head or motion packets. Hardware version
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) 4 allows tracking up to 5 fingers.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) Some Hardware version 3 and version 4 also have a trackpoint which uses a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) separate packet format. It is also 6 bytes per packet.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) The driver tries to support both hardware versions and should be compatible
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) with the Xorg Synaptics touchpad driver and its graphical configuration
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) utilities.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) Note that a mouse button is also associated with either the touchpad or the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) trackpoint when a trackpoint is available. Disabling the Touchpad in xorg
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) (TouchPadOff=0) will also disable the buttons associated with the touchpad.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) Additionally the operation of the touchpad can be altered by adjusting the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) contents of some of its internal registers. These registers are represented
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) by the driver as sysfs entries under /sys/bus/serio/drivers/psmouse/serio?
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) that can be read from and written to.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) Currently only the registers for hardware version 1 are somewhat understood.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) Hardware version 2 seems to use some of the same registers but it is not
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) known whether the bits in the registers represent the same thing or might
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) have changed their meaning.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) On top of that, some register settings have effect only when the touchpad is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) in relative mode and not in absolute mode. As the Linux Elantech touchpad
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) driver always puts the hardware into absolute mode not all information
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) mentioned below can be used immediately. But because there is no freely
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) available Elantech documentation the information is provided here anyway for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) completeness sake.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) Extra knobs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) ~~~~~~~~~~~
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) Currently the Linux Elantech touchpad driver provides three extra knobs under
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) /sys/bus/serio/drivers/psmouse/serio? for the user.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) * debug
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) Turn different levels of debugging ON or OFF.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) By echoing "0" to this file all debugging will be turned OFF.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) Currently a value of "1" will turn on some basic debugging and a value of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) "2" will turn on packet debugging. For hardware version 1 the default is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) OFF. For version 2 the default is "1".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) Turning packet debugging on will make the driver dump every packet
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) received to the syslog before processing it. Be warned that this can
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) generate quite a lot of data!
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) * paritycheck
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) Turns parity checking ON or OFF.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) By echoing "0" to this file parity checking will be turned OFF. Any
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) non-zero value will turn it ON. For hardware version 1 the default is ON.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) For version 2 the default it is OFF.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) Hardware version 1 provides basic data integrity verification by
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) calculating a parity bit for the last 3 bytes of each packet. The driver
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) can check these bits and reject any packet that appears corrupted. Using
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) this knob you can bypass that check.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) Hardware version 2 does not provide the same parity bits. Only some basic
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) data consistency checking can be done. For now checking is disabled by
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) default. Currently even turning it on will do nothing.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) * crc_enabled
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) Sets crc_enabled to 0/1. The name "crc_enabled" is the official name of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) this integrity check, even though it is not an actual cyclic redundancy
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) check.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) Depending on the state of crc_enabled, certain basic data integrity
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) verification is done by the driver on hardware version 3 and 4. The
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) driver will reject any packet that appears corrupted. Using this knob,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) The state of crc_enabled can be altered with this knob.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) Reading the crc_enabled value will show the active value. Echoing
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) "0" or "1" to this file will set the state to "0" or "1".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) Differentiating hardware versions
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) To detect the hardware version, read the version number as param[0].param[1].param[2]::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) 4 bytes version: (after the arrow is the name given in the Dell-provided driver)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) 02.00.22 => EF013
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) 02.06.00 => EF019
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) In the wild, there appear to be more versions, such as 00.01.64, 01.00.21,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) 02.00.00, 02.00.04, 02.00.06::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) 6 bytes:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) 02.00.30 => EF113
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) 02.08.00 => EF023
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) 02.08.XX => EF123
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) 02.0B.00 => EF215
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) 04.01.XX => Scroll_EF051
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) 04.02.XX => EF051
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) In the wild, there appear to be more versions, such as 04.03.01, 04.04.11. There
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) appears to be almost no difference, except for EF113, which does not report
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) pressure/width and has different data consistency checks.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) Probably all the versions with param[0] <= 01 can be considered as
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) 4 bytes/firmware 1. The versions < 02.08.00, with the exception of 02.00.30, as
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) 4 bytes/firmware 2. Everything >= 02.08.00 can be considered as 6 bytes.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) Hardware version 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) ~~~~~~~~~~~~~~~~~~
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) Registers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) ---------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) By echoing a hexadecimal value to a register it contents can be altered.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) For example::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) echo -n 0x16 > reg_10
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) * reg_10::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) B C T D L A S E
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) E: 1 = enable smart edges unconditionally
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) S: 1 = enable smart edges only when dragging
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) A: 1 = absolute mode (needs 4 byte packets, see reg_11)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) L: 1 = enable drag lock (see reg_22)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) D: 1 = disable dynamic resolution
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) T: 1 = disable tapping
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) C: 1 = enable corner tap
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) B: 1 = swap left and right button
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) * reg_11::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) 1 0 0 H V 1 F P
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) P: 1 = enable parity checking for relative mode
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) F: 1 = enable native 4 byte packet mode
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) V: 1 = enable vertical scroll area
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) H: 1 = enable horizontal scroll area
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) * reg_20::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) single finger width?
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) * reg_21::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) scroll area width (small: 0x40 ... wide: 0xff)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) * reg_22::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) drag lock time out (short: 0x14 ... long: 0xfe;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) 0xff = tap again to release)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) * reg_23::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) tap make timeout?
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) * reg_24::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) tap release timeout?
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) * reg_25::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) smart edge cursor speed (0x02 = slow, 0x03 = medium, 0x04 = fast)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) * reg_26::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) smart edge activation area width?
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) Native relative mode 4 byte packet format
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) -----------------------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) byte 0::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) c c p2 p1 1 M R L
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) L, R, M = 1 when Left, Right, Middle mouse button pressed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) some models have M as byte 3 odd parity bit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) when parity checking is enabled (reg_11, P = 1):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) p1..p2 = byte 1 and 2 odd parity bit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) c = 1 when corner tap detected
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) byte 1::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252) dx7 dx6 dx5 dx4 dx3 dx2 dx1 dx0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254) dx7..dx0 = x movement; positive = right, negative = left
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255) byte 1 = 0xf0 when corner tap detected
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) byte 2::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260) dy7 dy6 dy5 dy4 dy3 dy2 dy1 dy0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) dy7..dy0 = y movement; positive = up, negative = down
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264) byte 3::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266) parity checking enabled (reg_11, P = 1):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269) w h n1 n0 ds3 ds2 ds1 ds0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271) normally:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272) ds3..ds0 = scroll wheel amount and direction
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273) positive = down or left
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274) negative = up or right
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275) when corner tap detected:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276) ds0 = 1 when top right corner tapped
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277) ds1 = 1 when bottom right corner tapped
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278) ds2 = 1 when bottom left corner tapped
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279) ds3 = 1 when top left corner tapped
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 280) n1..n0 = number of fingers on touchpad
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 281) only models with firmware 2.x report this, models with
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 282) firmware 1.x seem to map one, two and three finger taps
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 283) directly to L, M and R mouse buttons
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 284) h = 1 when horizontal scroll action
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 285) w = 1 when wide finger touch?
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 286)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 287) otherwise (reg_11, P = 0):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 288)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 289) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 290) ds7 ds6 ds5 ds4 ds3 ds2 ds1 ds0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 291)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 292) ds7..ds0 = vertical scroll amount and direction
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 293) negative = up
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 294) positive = down
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 295)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 296)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 297) Native absolute mode 4 byte packet format
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 298) -----------------------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 299)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 300) EF013 and EF019 have a special behaviour (due to a bug in the firmware?), and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 301) when 1 finger is touching, the first 2 position reports must be discarded.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 302) This counting is reset whenever a different number of fingers is reported.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 303)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 304) byte 0::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 305)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 306) firmware version 1.x:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 307)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 308) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 309) D U p1 p2 1 p3 R L
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 310)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 311) L, R = 1 when Left, Right mouse button pressed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 312) p1..p3 = byte 1..3 odd parity bit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 313) D, U = 1 when rocker switch pressed Up, Down
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 314)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 315) firmware version 2.x:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 316)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 317) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 318) n1 n0 p2 p1 1 p3 R L
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 319)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 320) L, R = 1 when Left, Right mouse button pressed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 321) p1..p3 = byte 1..3 odd parity bit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 322) n1..n0 = number of fingers on touchpad
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 323)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 324) byte 1::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 325)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 326) firmware version 1.x:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 327)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 328) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 329) f 0 th tw x9 x8 y9 y8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 330)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 331) tw = 1 when two finger touch
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 332) th = 1 when three finger touch
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 333) f = 1 when finger touch
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 334)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 335) firmware version 2.x:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 336)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 337) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 338) . . . . x9 x8 y9 y8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 339)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 340) byte 2::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 341)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 342) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 343) x7 x6 x5 x4 x3 x2 x1 x0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 344)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 345) x9..x0 = absolute x value (horizontal)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 346)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 347) byte 3::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 348)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 349) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 350) y7 y6 y5 y4 y3 y2 y1 y0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 351)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 352) y9..y0 = absolute y value (vertical)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 353)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 354)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 355) Hardware version 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 356) ~~~~~~~~~~~~~~~~~~
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 357)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 358)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 359) Registers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 360) ---------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 361)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 362) By echoing a hexadecimal value to a register it contents can be altered.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 363)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 364) For example::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 365)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 366) echo -n 0x56 > reg_10
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 367)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 368) * reg_10::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 369)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 370) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 371) 0 1 0 1 0 1 D 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 372)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 373) D: 1 = enable drag and drop
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 374)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 375) * reg_11::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 376)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 377) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 378) 1 0 0 0 S 0 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 379)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 380) S: 1 = enable vertical scroll
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 381)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 382) * reg_21::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 383)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 384) unknown (0x00)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 385)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 386) * reg_22::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 387)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 388) drag and drop release time out (short: 0x70 ... long 0x7e;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 389) 0x7f = never i.e. tap again to release)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 390)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 391)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 392) Native absolute mode 6 byte packet format
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 393) -----------------------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 394)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 395) Parity checking and packet re-synchronization
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 396) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 397)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 398) There is no parity checking, however some consistency checks can be performed.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 399)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 400) For instance for EF113::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 401)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 402) SA1= packet[0];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 403) A1 = packet[1];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 404) B1 = packet[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 405) SB1= packet[3];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 406) C1 = packet[4];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 407) D1 = packet[5];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 408) if( (((SA1 & 0x3C) != 0x3C) && ((SA1 & 0xC0) != 0x80)) || // check Byte 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 409) (((SA1 & 0x0C) != 0x0C) && ((SA1 & 0xC0) == 0x80)) || // check Byte 1 (one finger pressed)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 410) (((SA1 & 0xC0) != 0x80) && (( A1 & 0xF0) != 0x00)) || // check Byte 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 411) (((SB1 & 0x3E) != 0x38) && ((SA1 & 0xC0) != 0x80)) || // check Byte 4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 412) (((SB1 & 0x0E) != 0x08) && ((SA1 & 0xC0) == 0x80)) || // check Byte 4 (one finger pressed)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 413) (((SA1 & 0xC0) != 0x80) && (( C1 & 0xF0) != 0x00)) ) // check Byte 5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 414) // error detected
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 415)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 416) For all the other ones, there are just a few constant bits::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 417)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 418) if( ((packet[0] & 0x0C) != 0x04) ||
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 419) ((packet[3] & 0x0f) != 0x02) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 420) // error detected
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 421)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 422)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 423) In case an error is detected, all the packets are shifted by one (and packet[0] is discarded).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 424)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 425) One/Three finger touch
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 426) ^^^^^^^^^^^^^^^^^^^^^^
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 427)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 428) byte 0::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 429)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 430) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 431) n1 n0 w3 w2 . . R L
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 432)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 433) L, R = 1 when Left, Right mouse button pressed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 434) n1..n0 = number of fingers on touchpad
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 435)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 436) byte 1::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 437)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 438) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 439) p7 p6 p5 p4 x11 x10 x9 x8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 440)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 441) byte 2::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 442)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 443) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 444) x7 x6 x5 x4 x3 x2 x1 x0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 445)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 446) x11..x0 = absolute x value (horizontal)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 447)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 448) byte 3::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 449)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 450) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 451) n4 vf w1 w0 . . . b2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 452)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 453) n4 = set if more than 3 fingers (only in 3 fingers mode)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 454) vf = a kind of flag ? (only on EF123, 0 when finger is over one
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 455) of the buttons, 1 otherwise)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 456) w3..w0 = width of the finger touch (not EF113)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 457) b2 (on EF113 only, 0 otherwise), b2.R.L indicates one button pressed:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 458) 0 = none
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 459) 1 = Left
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 460) 2 = Right
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 461) 3 = Middle (Left and Right)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 462) 4 = Forward
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 463) 5 = Back
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 464) 6 = Another one
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 465) 7 = Another one
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 466)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 467) byte 4::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 468)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 469) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 470) p3 p1 p2 p0 y11 y10 y9 y8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 471)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 472) p7..p0 = pressure (not EF113)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 473)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 474) byte 5::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 475)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 476) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 477) y7 y6 y5 y4 y3 y2 y1 y0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 478)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 479) y11..y0 = absolute y value (vertical)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 480)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 481)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 482) Two finger touch
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 483) ^^^^^^^^^^^^^^^^
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 484)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 485) Note that the two pairs of coordinates are not exactly the coordinates of the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 486) two fingers, but only the pair of the lower-left and upper-right coordinates.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 487) So the actual fingers might be situated on the other diagonal of the square
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 488) defined by these two points.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 489)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 490) byte 0::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 491)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 492) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 493) n1 n0 ay8 ax8 . . R L
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 494)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 495) L, R = 1 when Left, Right mouse button pressed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 496) n1..n0 = number of fingers on touchpad
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 497)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 498) byte 1::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 499)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 500) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 501) ax7 ax6 ax5 ax4 ax3 ax2 ax1 ax0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 502)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 503) ax8..ax0 = lower-left finger absolute x value
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 504)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 505) byte 2::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 506)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 507) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 508) ay7 ay6 ay5 ay4 ay3 ay2 ay1 ay0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 509)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 510) ay8..ay0 = lower-left finger absolute y value
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 511)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 512) byte 3::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 513)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 514) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 515) . . by8 bx8 . . . .
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 516)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 517) byte 4::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 518)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 519) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 520) bx7 bx6 bx5 bx4 bx3 bx2 bx1 bx0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 521)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 522) bx8..bx0 = upper-right finger absolute x value
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 523)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 524) byte 5::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 525)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 526) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 527) by7 by8 by5 by4 by3 by2 by1 by0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 528)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 529) by8..by0 = upper-right finger absolute y value
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 530)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 531) Hardware version 3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 532) ~~~~~~~~~~~~~~~~~~
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 533)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 534) Registers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 535) ---------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 536)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 537) * reg_10::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 538)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 539) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 540) 0 0 0 0 R F T A
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 541)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 542) A: 1 = enable absolute tracking
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 543) T: 1 = enable two finger mode auto correct
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 544) F: 1 = disable ABS Position Filter
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 545) R: 1 = enable real hardware resolution
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 546)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 547) Native absolute mode 6 byte packet format
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 548) -----------------------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 549)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 550) 1 and 3 finger touch shares the same 6-byte packet format, except that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 551) 3 finger touch only reports the position of the center of all three fingers.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 552)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 553) Firmware would send 12 bytes of data for 2 finger touch.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 554)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 555) Note on debounce:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 556) In case the box has unstable power supply or other electricity issues, or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 557) when number of finger changes, F/W would send "debounce packet" to inform
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 558) driver that the hardware is in debounce status.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 559) The debouce packet has the following signature::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 560)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 561) byte 0: 0xc4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 562) byte 1: 0xff
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 563) byte 2: 0xff
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 564) byte 3: 0x02
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 565) byte 4: 0xff
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 566) byte 5: 0xff
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 567)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 568) When we encounter this kind of packet, we just ignore it.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 569)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 570) One/Three finger touch
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 571) ^^^^^^^^^^^^^^^^^^^^^^
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 572)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 573) byte 0::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 574)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 575) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 576) n1 n0 w3 w2 0 1 R L
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 577)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 578) L, R = 1 when Left, Right mouse button pressed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 579) n1..n0 = number of fingers on touchpad
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 580)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 581) byte 1::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 582)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 583) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 584) p7 p6 p5 p4 x11 x10 x9 x8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 585)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 586) byte 2::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 587)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 588) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 589) x7 x6 x5 x4 x3 x2 x1 x0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 590)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 591) x11..x0 = absolute x value (horizontal)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 592)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 593) byte 3::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 594)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 595) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 596) 0 0 w1 w0 0 0 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 597)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 598) w3..w0 = width of the finger touch
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 599)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 600) byte 4::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 601)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 602) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 603) p3 p1 p2 p0 y11 y10 y9 y8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 604)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 605) p7..p0 = pressure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 606)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 607) byte 5::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 608)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 609) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 610) y7 y6 y5 y4 y3 y2 y1 y0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 611)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 612) y11..y0 = absolute y value (vertical)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 613)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 614) Two finger touch
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 615) ^^^^^^^^^^^^^^^^
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 616)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 617) The packet format is exactly the same for two finger touch, except the hardware
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 618) sends two 6 byte packets. The first packet contains data for the first finger,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 619) the second packet has data for the second finger. So for two finger touch a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 620) total of 12 bytes are sent.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 621)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 622) Hardware version 4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 623) ~~~~~~~~~~~~~~~~~~
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 624)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 625) Registers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 626) ---------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 627)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 628) * reg_07::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 629)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 630) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 631) 0 0 0 0 0 0 0 A
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 632)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 633) A: 1 = enable absolute tracking
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 634)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 635) Native absolute mode 6 byte packet format
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 636) -----------------------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 637)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 638) v4 hardware is a true multitouch touchpad, capable of tracking up to 5 fingers.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 639) Unfortunately, due to PS/2's limited bandwidth, its packet format is rather
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 640) complex.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 641)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 642) Whenever the numbers or identities of the fingers changes, the hardware sends a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 643) status packet to indicate how many and which fingers is on touchpad, followed by
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 644) head packets or motion packets. A head packet contains data of finger id, finger
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 645) position (absolute x, y values), width, and pressure. A motion packet contains
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 646) two fingers' position delta.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 647)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 648) For example, when status packet tells there are 2 fingers on touchpad, then we
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 649) can expect two following head packets. If the finger status doesn't change,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 650) the following packets would be motion packets, only sending delta of finger
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 651) position, until we receive a status packet.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 652)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 653) One exception is one finger touch. when a status packet tells us there is only
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 654) one finger, the hardware would just send head packets afterwards.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 655)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 656) Status packet
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 657) ^^^^^^^^^^^^^
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 658)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 659) byte 0::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 660)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 661) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 662) . . . . 0 1 R L
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 663)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 664) L, R = 1 when Left, Right mouse button pressed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 665)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 666) byte 1::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 667)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 668) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 669) . . . ft4 ft3 ft2 ft1 ft0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 670)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 671) ft4 ft3 ft2 ft1 ft0 ftn = 1 when finger n is on touchpad
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 672)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 673) byte 2::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 674)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 675) not used
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 676)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 677) byte 3::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 678)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 679) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 680) . . . 1 0 0 0 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 681)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 682) constant bits
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 683)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 684) byte 4::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 685)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 686) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 687) p . . . . . . .
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 688)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 689) p = 1 for palm
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 690)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 691) byte 5::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 692)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 693) not used
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 694)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 695) Head packet
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 696) ^^^^^^^^^^^
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 697)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 698) byte 0::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 699)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 700) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 701) w3 w2 w1 w0 0 1 R L
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 702)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 703) L, R = 1 when Left, Right mouse button pressed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 704) w3..w0 = finger width (spans how many trace lines)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 705)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 706) byte 1::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 707)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 708) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 709) p7 p6 p5 p4 x11 x10 x9 x8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 710)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 711) byte 2::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 712)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 713) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 714) x7 x6 x5 x4 x3 x2 x1 x0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 715)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 716) x11..x0 = absolute x value (horizontal)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 717)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 718) byte 3::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 719)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 720) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 721) id2 id1 id0 1 0 0 0 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 722)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 723) id2..id0 = finger id
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 724)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 725) byte 4::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 726)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 727) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 728) p3 p1 p2 p0 y11 y10 y9 y8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 729)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 730) p7..p0 = pressure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 731)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 732) byte 5::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 733)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 734) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 735) y7 y6 y5 y4 y3 y2 y1 y0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 736)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 737) y11..y0 = absolute y value (vertical)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 738)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 739) Motion packet
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 740) ^^^^^^^^^^^^^
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 741)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 742) byte 0::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 743)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 744) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 745) id2 id1 id0 w 0 1 R L
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 746)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 747) L, R = 1 when Left, Right mouse button pressed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 748) id2..id0 = finger id
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 749) w = 1 when delta overflows (> 127 or < -128), in this case
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 750) firmware sends us (delta x / 5) and (delta y / 5)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 751)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 752) byte 1::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 753)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 754) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 755) x7 x6 x5 x4 x3 x2 x1 x0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 756)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 757) x7..x0 = delta x (two's complement)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 758)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 759) byte 2::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 760)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 761) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 762) y7 y6 y5 y4 y3 y2 y1 y0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 763)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 764) y7..y0 = delta y (two's complement)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 765)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 766) byte 3::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 767)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 768) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 769) id2 id1 id0 1 0 0 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 770)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 771) id2..id0 = finger id
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 772)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 773) byte 4::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 774)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 775) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 776) x7 x6 x5 x4 x3 x2 x1 x0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 777)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 778) x7..x0 = delta x (two's complement)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 779)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 780) byte 5::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 781)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 782) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 783) y7 y6 y5 y4 y3 y2 y1 y0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 784)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 785) y7..y0 = delta y (two's complement)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 786)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 787) byte 0 ~ 2 for one finger
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 788) byte 3 ~ 5 for another
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 789)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 790)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 791) Trackpoint (for Hardware version 3 and 4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 792) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 793)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 794) Registers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 795) ---------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 796)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 797) No special registers have been identified.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 798)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 799) Native relative mode 6 byte packet format
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 800) -----------------------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 801)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 802) Status Packet
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 803) ^^^^^^^^^^^^^
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 804)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 805) byte 0::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 806)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 807) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 808) 0 0 sx sy 0 M R L
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 809)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 810) byte 1::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 811)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 812) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 813) ~sx 0 0 0 0 0 0 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 814)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 815) byte 2::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 816)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 817) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 818) ~sy 0 0 0 0 0 0 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 819)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 820) byte 3::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 821)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 822) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 823) 0 0 ~sy ~sx 0 1 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 824)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 825) byte 4::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 826)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 827) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 828) x7 x6 x5 x4 x3 x2 x1 x0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 829)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 830) byte 5::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 831)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 832) bit 7 6 5 4 3 2 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 833) y7 y6 y5 y4 y3 y2 y1 y0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 834)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 835)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 836) x and y are written in two's complement spread
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 837) over 9 bits with sx/sy the relative top bit and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 838) x7..x0 and y7..y0 the lower bits.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 839) ~sx is the inverse of sx, ~sy is the inverse of sy.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 840) The sign of y is opposite to what the input driver
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 841) expects for a relative movement