elantech.txt 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746
  1. Elantech Touchpad Driver
  2. ========================
  3. Copyright (C) 2007-2008 Arjan Opmeer <arjan@opmeer.net>
  4. Extra information for hardware version 1 found and
  5. provided by Steve Havelka
  6. Version 2 (EeePC) hardware support based on patches
  7. received from Woody at Xandros and forwarded to me
  8. by user StewieGriffin at the eeeuser.com forum
  9. Contents
  10. ~~~~~~~~
  11. 1. Introduction
  12. 2. Extra knobs
  13. 3. Differentiating hardware versions
  14. 4. Hardware version 1
  15. 4.1 Registers
  16. 4.2 Native relative mode 4 byte packet format
  17. 4.3 Native absolute mode 4 byte packet format
  18. 5. Hardware version 2
  19. 5.1 Registers
  20. 5.2 Native absolute mode 6 byte packet format
  21. 5.2.1 Parity checking and packet re-synchronization
  22. 5.2.2 One/Three finger touch
  23. 5.2.3 Two finger touch
  24. 6. Hardware version 3
  25. 6.1 Registers
  26. 6.2 Native absolute mode 6 byte packet format
  27. 6.2.1 One/Three finger touch
  28. 6.2.2 Two finger touch
  29. 7. Hardware version 4
  30. 7.1 Registers
  31. 7.2 Native absolute mode 6 byte packet format
  32. 7.2.1 Status packet
  33. 7.2.2 Head packet
  34. 7.2.3 Motion packet
  35. 1. Introduction
  36. ~~~~~~~~~~~~
  37. Currently the Linux Elantech touchpad driver is aware of two different
  38. hardware versions unimaginatively called version 1 and version 2. Version 1
  39. is found in "older" laptops and uses 4 bytes per packet. Version 2 seems to
  40. be introduced with the EeePC and uses 6 bytes per packet, and provides
  41. additional features such as position of two fingers, and width of the touch.
  42. The driver tries to support both hardware versions and should be compatible
  43. with the Xorg Synaptics touchpad driver and its graphical configuration
  44. utilities.
  45. Additionally the operation of the touchpad can be altered by adjusting the
  46. contents of some of its internal registers. These registers are represented
  47. by the driver as sysfs entries under /sys/bus/serio/drivers/psmouse/serio?
  48. that can be read from and written to.
  49. Currently only the registers for hardware version 1 are somewhat understood.
  50. Hardware version 2 seems to use some of the same registers but it is not
  51. known whether the bits in the registers represent the same thing or might
  52. have changed their meaning.
  53. On top of that, some register settings have effect only when the touchpad is
  54. in relative mode and not in absolute mode. As the Linux Elantech touchpad
  55. driver always puts the hardware into absolute mode not all information
  56. mentioned below can be used immediately. But because there is no freely
  57. available Elantech documentation the information is provided here anyway for
  58. completeness sake.
  59. /////////////////////////////////////////////////////////////////////////////
  60. 2. Extra knobs
  61. ~~~~~~~~~~~
  62. Currently the Linux Elantech touchpad driver provides two extra knobs under
  63. /sys/bus/serio/drivers/psmouse/serio? for the user.
  64. * debug
  65. Turn different levels of debugging ON or OFF.
  66. By echoing "0" to this file all debugging will be turned OFF.
  67. Currently a value of "1" will turn on some basic debugging and a value of
  68. "2" will turn on packet debugging. For hardware version 1 the default is
  69. OFF. For version 2 the default is "1".
  70. Turning packet debugging on will make the driver dump every packet
  71. received to the syslog before processing it. Be warned that this can
  72. generate quite a lot of data!
  73. * paritycheck
  74. Turns parity checking ON or OFF.
  75. By echoing "0" to this file parity checking will be turned OFF. Any
  76. non-zero value will turn it ON. For hardware version 1 the default is ON.
  77. For version 2 the default it is OFF.
  78. Hardware version 1 provides basic data integrity verification by
  79. calculating a parity bit for the last 3 bytes of each packet. The driver
  80. can check these bits and reject any packet that appears corrupted. Using
  81. this knob you can bypass that check.
  82. Hardware version 2 does not provide the same parity bits. Only some basic
  83. data consistency checking can be done. For now checking is disabled by
  84. default. Currently even turning it on will do nothing.
  85. /////////////////////////////////////////////////////////////////////////////
  86. 3. Differentiating hardware versions
  87. =================================
  88. To detect the hardware version, read the version number as param[0].param[1].param[2]
  89. 4 bytes version: (after the arrow is the name given in the Dell-provided driver)
  90. 02.00.22 => EF013
  91. 02.06.00 => EF019
  92. In the wild, there appear to be more versions, such as 00.01.64, 01.00.21,
  93. 02.00.00, 02.00.04, 02.00.06.
  94. 6 bytes:
  95. 02.00.30 => EF113
  96. 02.08.00 => EF023
  97. 02.08.XX => EF123
  98. 02.0B.00 => EF215
  99. 04.01.XX => Scroll_EF051
  100. 04.02.XX => EF051
  101. In the wild, there appear to be more versions, such as 04.03.01, 04.04.11. There
  102. appears to be almost no difference, except for EF113, which does not report
  103. pressure/width and has different data consistency checks.
  104. Probably all the versions with param[0] <= 01 can be considered as
  105. 4 bytes/firmware 1. The versions < 02.08.00, with the exception of 02.00.30, as
  106. 4 bytes/firmware 2. Everything >= 02.08.00 can be considered as 6 bytes.
  107. /////////////////////////////////////////////////////////////////////////////
  108. 4. Hardware version 1
  109. ==================
  110. 4.1 Registers
  111. ~~~~~~~~~
  112. By echoing a hexadecimal value to a register it contents can be altered.
  113. For example:
  114. echo -n 0x16 > reg_10
  115. * reg_10
  116. bit 7 6 5 4 3 2 1 0
  117. B C T D L A S E
  118. E: 1 = enable smart edges unconditionally
  119. S: 1 = enable smart edges only when dragging
  120. A: 1 = absolute mode (needs 4 byte packets, see reg_11)
  121. L: 1 = enable drag lock (see reg_22)
  122. D: 1 = disable dynamic resolution
  123. T: 1 = disable tapping
  124. C: 1 = enable corner tap
  125. B: 1 = swap left and right button
  126. * reg_11
  127. bit 7 6 5 4 3 2 1 0
  128. 1 0 0 H V 1 F P
  129. P: 1 = enable parity checking for relative mode
  130. F: 1 = enable native 4 byte packet mode
  131. V: 1 = enable vertical scroll area
  132. H: 1 = enable horizontal scroll area
  133. * reg_20
  134. single finger width?
  135. * reg_21
  136. scroll area width (small: 0x40 ... wide: 0xff)
  137. * reg_22
  138. drag lock time out (short: 0x14 ... long: 0xfe;
  139. 0xff = tap again to release)
  140. * reg_23
  141. tap make timeout?
  142. * reg_24
  143. tap release timeout?
  144. * reg_25
  145. smart edge cursor speed (0x02 = slow, 0x03 = medium, 0x04 = fast)
  146. * reg_26
  147. smart edge activation area width?
  148. 4.2 Native relative mode 4 byte packet format
  149. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  150. byte 0:
  151. bit 7 6 5 4 3 2 1 0
  152. c c p2 p1 1 M R L
  153. L, R, M = 1 when Left, Right, Middle mouse button pressed
  154. some models have M as byte 3 odd parity bit
  155. when parity checking is enabled (reg_11, P = 1):
  156. p1..p2 = byte 1 and 2 odd parity bit
  157. c = 1 when corner tap detected
  158. byte 1:
  159. bit 7 6 5 4 3 2 1 0
  160. dx7 dx6 dx5 dx4 dx3 dx2 dx1 dx0
  161. dx7..dx0 = x movement; positive = right, negative = left
  162. byte 1 = 0xf0 when corner tap detected
  163. byte 2:
  164. bit 7 6 5 4 3 2 1 0
  165. dy7 dy6 dy5 dy4 dy3 dy2 dy1 dy0
  166. dy7..dy0 = y movement; positive = up, negative = down
  167. byte 3:
  168. parity checking enabled (reg_11, P = 1):
  169. bit 7 6 5 4 3 2 1 0
  170. w h n1 n0 ds3 ds2 ds1 ds0
  171. normally:
  172. ds3..ds0 = scroll wheel amount and direction
  173. positive = down or left
  174. negative = up or right
  175. when corner tap detected:
  176. ds0 = 1 when top right corner tapped
  177. ds1 = 1 when bottom right corner tapped
  178. ds2 = 1 when bottom left corner tapped
  179. ds3 = 1 when top left corner tapped
  180. n1..n0 = number of fingers on touchpad
  181. only models with firmware 2.x report this, models with
  182. firmware 1.x seem to map one, two and three finger taps
  183. directly to L, M and R mouse buttons
  184. h = 1 when horizontal scroll action
  185. w = 1 when wide finger touch?
  186. otherwise (reg_11, P = 0):
  187. bit 7 6 5 4 3 2 1 0
  188. ds7 ds6 ds5 ds4 ds3 ds2 ds1 ds0
  189. ds7..ds0 = vertical scroll amount and direction
  190. negative = up
  191. positive = down
  192. 4.3 Native absolute mode 4 byte packet format
  193. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  194. EF013 and EF019 have a special behaviour (due to a bug in the firmware?), and
  195. when 1 finger is touching, the first 2 position reports must be discarded.
  196. This counting is reset whenever a different number of fingers is reported.
  197. byte 0:
  198. firmware version 1.x:
  199. bit 7 6 5 4 3 2 1 0
  200. D U p1 p2 1 p3 R L
  201. L, R = 1 when Left, Right mouse button pressed
  202. p1..p3 = byte 1..3 odd parity bit
  203. D, U = 1 when rocker switch pressed Up, Down
  204. firmware version 2.x:
  205. bit 7 6 5 4 3 2 1 0
  206. n1 n0 p2 p1 1 p3 R L
  207. L, R = 1 when Left, Right mouse button pressed
  208. p1..p3 = byte 1..3 odd parity bit
  209. n1..n0 = number of fingers on touchpad
  210. byte 1:
  211. firmware version 1.x:
  212. bit 7 6 5 4 3 2 1 0
  213. f 0 th tw x9 x8 y9 y8
  214. tw = 1 when two finger touch
  215. th = 1 when three finger touch
  216. f = 1 when finger touch
  217. firmware version 2.x:
  218. bit 7 6 5 4 3 2 1 0
  219. . . . . x9 x8 y9 y8
  220. byte 2:
  221. bit 7 6 5 4 3 2 1 0
  222. x7 x6 x5 x4 x3 x2 x1 x0
  223. x9..x0 = absolute x value (horizontal)
  224. byte 3:
  225. bit 7 6 5 4 3 2 1 0
  226. y7 y6 y5 y4 y3 y2 y1 y0
  227. y9..y0 = absolute y value (vertical)
  228. /////////////////////////////////////////////////////////////////////////////
  229. 5. Hardware version 2
  230. ==================
  231. 5.1 Registers
  232. ~~~~~~~~~
  233. By echoing a hexadecimal value to a register it contents can be altered.
  234. For example:
  235. echo -n 0x56 > reg_10
  236. * reg_10
  237. bit 7 6 5 4 3 2 1 0
  238. 0 1 0 1 0 1 D 0
  239. D: 1 = enable drag and drop
  240. * reg_11
  241. bit 7 6 5 4 3 2 1 0
  242. 1 0 0 0 S 0 1 0
  243. S: 1 = enable vertical scroll
  244. * reg_21
  245. unknown (0x00)
  246. * reg_22
  247. drag and drop release time out (short: 0x70 ... long 0x7e;
  248. 0x7f = never i.e. tap again to release)
  249. 5.2 Native absolute mode 6 byte packet format
  250. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  251. 5.2.1 Parity checking and packet re-synchronization
  252. There is no parity checking, however some consistency checks can be performed.
  253. For instance for EF113:
  254. SA1= packet[0];
  255. A1 = packet[1];
  256. B1 = packet[2];
  257. SB1= packet[3];
  258. C1 = packet[4];
  259. D1 = packet[5];
  260. if( (((SA1 & 0x3C) != 0x3C) && ((SA1 & 0xC0) != 0x80)) || // check Byte 1
  261. (((SA1 & 0x0C) != 0x0C) && ((SA1 & 0xC0) == 0x80)) || // check Byte 1 (one finger pressed)
  262. (((SA1 & 0xC0) != 0x80) && (( A1 & 0xF0) != 0x00)) || // check Byte 2
  263. (((SB1 & 0x3E) != 0x38) && ((SA1 & 0xC0) != 0x80)) || // check Byte 4
  264. (((SB1 & 0x0E) != 0x08) && ((SA1 & 0xC0) == 0x80)) || // check Byte 4 (one finger pressed)
  265. (((SA1 & 0xC0) != 0x80) && (( C1 & 0xF0) != 0x00)) ) // check Byte 5
  266. // error detected
  267. For all the other ones, there are just a few constant bits:
  268. if( ((packet[0] & 0x0C) != 0x04) ||
  269. ((packet[3] & 0x0f) != 0x02) )
  270. // error detected
  271. In case an error is detected, all the packets are shifted by one (and packet[0] is discarded).
  272. 5.2.2 One/Three finger touch
  273. ~~~~~~~~~~~~~~~~
  274. byte 0:
  275. bit 7 6 5 4 3 2 1 0
  276. n1 n0 w3 w2 . . R L
  277. L, R = 1 when Left, Right mouse button pressed
  278. n1..n0 = number of fingers on touchpad
  279. byte 1:
  280. bit 7 6 5 4 3 2 1 0
  281. p7 p6 p5 p4 x11 x10 x9 x8
  282. byte 2:
  283. bit 7 6 5 4 3 2 1 0
  284. x7 x6 x5 x4 x3 x2 x1 x0
  285. x11..x0 = absolute x value (horizontal)
  286. byte 3:
  287. bit 7 6 5 4 3 2 1 0
  288. n4 vf w1 w0 . . . b2
  289. n4 = set if more than 3 fingers (only in 3 fingers mode)
  290. vf = a kind of flag ? (only on EF123, 0 when finger is over one
  291. of the buttons, 1 otherwise)
  292. w3..w0 = width of the finger touch (not EF113)
  293. b2 (on EF113 only, 0 otherwise), b2.R.L indicates one button pressed:
  294. 0 = none
  295. 1 = Left
  296. 2 = Right
  297. 3 = Middle (Left and Right)
  298. 4 = Forward
  299. 5 = Back
  300. 6 = Another one
  301. 7 = Another one
  302. byte 4:
  303. bit 7 6 5 4 3 2 1 0
  304. p3 p1 p2 p0 y11 y10 y9 y8
  305. p7..p0 = pressure (not EF113)
  306. byte 5:
  307. bit 7 6 5 4 3 2 1 0
  308. y7 y6 y5 y4 y3 y2 y1 y0
  309. y11..y0 = absolute y value (vertical)
  310. 5.2.3 Two finger touch
  311. ~~~~~~~~~~~~~~~~
  312. Note that the two pairs of coordinates are not exactly the coordinates of the
  313. two fingers, but only the pair of the lower-left and upper-right coordinates.
  314. So the actual fingers might be situated on the other diagonal of the square
  315. defined by these two points.
  316. byte 0:
  317. bit 7 6 5 4 3 2 1 0
  318. n1 n0 ay8 ax8 . . R L
  319. L, R = 1 when Left, Right mouse button pressed
  320. n1..n0 = number of fingers on touchpad
  321. byte 1:
  322. bit 7 6 5 4 3 2 1 0
  323. ax7 ax6 ax5 ax4 ax3 ax2 ax1 ax0
  324. ax8..ax0 = lower-left finger absolute x value
  325. byte 2:
  326. bit 7 6 5 4 3 2 1 0
  327. ay7 ay6 ay5 ay4 ay3 ay2 ay1 ay0
  328. ay8..ay0 = lower-left finger absolute y value
  329. byte 3:
  330. bit 7 6 5 4 3 2 1 0
  331. . . by8 bx8 . . . .
  332. byte 4:
  333. bit 7 6 5 4 3 2 1 0
  334. bx7 bx6 bx5 bx4 bx3 bx2 bx1 bx0
  335. bx8..bx0 = upper-right finger absolute x value
  336. byte 5:
  337. bit 7 6 5 4 3 2 1 0
  338. by7 by8 by5 by4 by3 by2 by1 by0
  339. by8..by0 = upper-right finger absolute y value
  340. /////////////////////////////////////////////////////////////////////////////
  341. 6. Hardware version 3
  342. ==================
  343. 6.1 Registers
  344. ~~~~~~~~~
  345. * reg_10
  346. bit 7 6 5 4 3 2 1 0
  347. 0 0 0 0 0 0 0 A
  348. A: 1 = enable absolute tracking
  349. 6.2 Native absolute mode 6 byte packet format
  350. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  351. 1 and 3 finger touch shares the same 6-byte packet format, except that
  352. 3 finger touch only reports the position of the center of all three fingers.
  353. Firmware would send 12 bytes of data for 2 finger touch.
  354. Note on debounce:
  355. In case the box has unstable power supply or other electricity issues, or
  356. when number of finger changes, F/W would send "debounce packet" to inform
  357. driver that the hardware is in debounce status.
  358. The debouce packet has the following signature:
  359. byte 0: 0xc4
  360. byte 1: 0xff
  361. byte 2: 0xff
  362. byte 3: 0x02
  363. byte 4: 0xff
  364. byte 5: 0xff
  365. When we encounter this kind of packet, we just ignore it.
  366. 6.2.1 One/Three finger touch
  367. ~~~~~~~~~~~~~~~~~~~~~~
  368. byte 0:
  369. bit 7 6 5 4 3 2 1 0
  370. n1 n0 w3 w2 0 1 R L
  371. L, R = 1 when Left, Right mouse button pressed
  372. n1..n0 = number of fingers on touchpad
  373. byte 1:
  374. bit 7 6 5 4 3 2 1 0
  375. p7 p6 p5 p4 x11 x10 x9 x8
  376. byte 2:
  377. bit 7 6 5 4 3 2 1 0
  378. x7 x6 x5 x4 x3 x2 x1 x0
  379. x11..x0 = absolute x value (horizontal)
  380. byte 3:
  381. bit 7 6 5 4 3 2 1 0
  382. 0 0 w1 w0 0 0 1 0
  383. w3..w0 = width of the finger touch
  384. byte 4:
  385. bit 7 6 5 4 3 2 1 0
  386. p3 p1 p2 p0 y11 y10 y9 y8
  387. p7..p0 = pressure
  388. byte 5:
  389. bit 7 6 5 4 3 2 1 0
  390. y7 y6 y5 y4 y3 y2 y1 y0
  391. y11..y0 = absolute y value (vertical)
  392. 6.2.2 Two finger touch
  393. ~~~~~~~~~~~~~~~~
  394. The packet format is exactly the same for two finger touch, except the hardware
  395. sends two 6 byte packets. The first packet contains data for the first finger,
  396. the second packet has data for the second finger. So for two finger touch a
  397. total of 12 bytes are sent.
  398. /////////////////////////////////////////////////////////////////////////////
  399. 7. Hardware version 4
  400. ==================
  401. 7.1 Registers
  402. ~~~~~~~~~
  403. * reg_07
  404. bit 7 6 5 4 3 2 1 0
  405. 0 0 0 0 0 0 0 A
  406. A: 1 = enable absolute tracking
  407. 7.2 Native absolute mode 6 byte packet format
  408. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  409. v4 hardware is a true multitouch touchpad, capable of tracking up to 5 fingers.
  410. Unfortunately, due to PS/2's limited bandwidth, its packet format is rather
  411. complex.
  412. Whenever the numbers or identities of the fingers changes, the hardware sends a
  413. status packet to indicate how many and which fingers is on touchpad, followed by
  414. head packets or motion packets. A head packet contains data of finger id, finger
  415. position (absolute x, y values), width, and pressure. A motion packet contains
  416. two fingers' position delta.
  417. For example, when status packet tells there are 2 fingers on touchpad, then we
  418. can expect two following head packets. If the finger status doesn't change,
  419. the following packets would be motion packets, only sending delta of finger
  420. position, until we receive a status packet.
  421. One exception is one finger touch. when a status packet tells us there is only
  422. one finger, the hardware would just send head packets afterwards.
  423. 7.2.1 Status packet
  424. ~~~~~~~~~~~~~
  425. byte 0:
  426. bit 7 6 5 4 3 2 1 0
  427. . . . . 0 1 R L
  428. L, R = 1 when Left, Right mouse button pressed
  429. byte 1:
  430. bit 7 6 5 4 3 2 1 0
  431. . . . ft4 ft3 ft2 ft1 ft0
  432. ft4 ft3 ft2 ft1 ft0 ftn = 1 when finger n is on touchpad
  433. byte 2: not used
  434. byte 3:
  435. bit 7 6 5 4 3 2 1 0
  436. . . . 1 0 0 0 0
  437. constant bits
  438. byte 4:
  439. bit 7 6 5 4 3 2 1 0
  440. p . . . . . . .
  441. p = 1 for palm
  442. byte 5: not used
  443. 7.2.2 Head packet
  444. ~~~~~~~~~~~
  445. byte 0:
  446. bit 7 6 5 4 3 2 1 0
  447. w3 w2 w1 w0 0 1 R L
  448. L, R = 1 when Left, Right mouse button pressed
  449. w3..w0 = finger width (spans how many trace lines)
  450. byte 1:
  451. bit 7 6 5 4 3 2 1 0
  452. p7 p6 p5 p4 x11 x10 x9 x8
  453. byte 2:
  454. bit 7 6 5 4 3 2 1 0
  455. x7 x6 x5 x4 x3 x2 x1 x0
  456. x11..x0 = absolute x value (horizontal)
  457. byte 3:
  458. bit 7 6 5 4 3 2 1 0
  459. id2 id1 id0 1 0 0 0 1
  460. id2..id0 = finger id
  461. byte 4:
  462. bit 7 6 5 4 3 2 1 0
  463. p3 p1 p2 p0 y11 y10 y9 y8
  464. p7..p0 = pressure
  465. byte 5:
  466. bit 7 6 5 4 3 2 1 0
  467. y7 y6 y5 y4 y3 y2 y1 y0
  468. y11..y0 = absolute y value (vertical)
  469. 7.2.3 Motion packet
  470. ~~~~~~~~~~~~~
  471. byte 0:
  472. bit 7 6 5 4 3 2 1 0
  473. id2 id1 id0 w 0 1 R L
  474. L, R = 1 when Left, Right mouse button pressed
  475. id2..id0 = finger id
  476. w = 1 when delta overflows (> 127 or < -128), in this case
  477. firmware sends us (delta x / 5) and (delta y / 5)
  478. byte 1:
  479. bit 7 6 5 4 3 2 1 0
  480. x7 x6 x5 x4 x3 x2 x1 x0
  481. x7..x0 = delta x (two's complement)
  482. byte 2:
  483. bit 7 6 5 4 3 2 1 0
  484. y7 y6 y5 y4 y3 y2 y1 y0
  485. y7..y0 = delta y (two's complement)
  486. byte 3:
  487. bit 7 6 5 4 3 2 1 0
  488. id2 id1 id0 1 0 0 1 0
  489. id2..id0 = finger id
  490. byte 4:
  491. bit 7 6 5 4 3 2 1 0
  492. x7 x6 x5 x4 x3 x2 x1 x0
  493. x7..x0 = delta x (two's complement)
  494. byte 5:
  495. bit 7 6 5 4 3 2 1 0
  496. y7 y6 y5 y4 y3 y2 y1 y0
  497. y7..y0 = delta y (two's complement)
  498. byte 0 ~ 2 for one finger
  499. byte 3 ~ 5 for another