← Documents Documentation/input/devices/sentelic.rst GitHub 원문 ↗

Linux 6.18.37 · Input

Sentelic Touchpad

Sentelic FSP 터치패드의 상대·절대·다중 손가락 PS/2 패킷, 레지스터 프로그래밍과 Gesture ID를 설명합니다.

Source pathDocumentation/input/devices/sentelic.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약·해설

sentelic.rst:1-901

Sentelic FSP 문서는 MSID 4·6·7 패킷부터 STL3886-G0와 STL3888 Ax·B0·Cx·Dx의 절대 좌표, 다중 손가락, 통지 패킷을 정의합니다. 후반부는 PS/2 명령을 이용한 레지스터·page 접근과 세대별 제어 비트를 설명합니다.

문서 개요
항목내용
SourceDocumentation/input/devices/sentelic.rst
분량901 source lines
상대 모드MSID 4·6: 휠, 4방향 스크롤, Forward/Backward
절대 모드G0, Ax, B0, Cx/Dx의 4·8바이트 형식
멀티터치MFMC finger index와 notify sequence
명령PS/2 register read/write와 특수 값 변환
Page기본 `0x82`, page당 최대 255 registers
Gesture2·3손가락 이동, zoom, curve, palm ID
레지스터Cx 이전 `0x8240`, Cx 이후 `0x8290`·page `0x83`

패킷 세대와 프로그래밍 영역을 요약합니다.

FSP 초기화와 입력 처리
Device ID와 Version ID register 읽기세대와 버튼 수로 packet parsing 형식 선택필요한 Intellimouse·absolute·gesture mode 설정상위 type bit로 normal·absolute·notify 분류좌표·finger index·button·gesture 필드 해석레지스터 변경은 status response로 검증

장치 식별부터 패킷 해석까지의 전체 흐름입니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 .. include:: <isonum.txt>
2
3 =================
4 Sentelic Touchpad
5 =================
6
7
8 :Copyright: |copy| 2002-2011 Sentelic Corporation.
9
10 :Last update: Dec-07-2011
11
12 Finger Sensing Pad Intellimouse Mode (scrolling wheel, 4th and 5th buttons)
13 ============================================================================
14
15 A) MSID 4: Scrolling wheel mode plus Forward page(4th button) and Backward
16 page (5th button)
17
18 1. Set sample rate to 200;
19 2. Set sample rate to 200;
20 3. Set sample rate to 80;
21 4. Issuing the "Get device ID" command (0xF2) and waits for the response;
22 5. FSP will respond 0x04.
23
24 ::
25
26 Packet 1
27 Bit 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
28 BYTE |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
29 1 |Y|X|y|x|1|M|R|L| 2 |X|X|X|X|X|X|X|X| 3 |Y|Y|Y|Y|Y|Y|Y|Y| 4 | | |B|F|W|W|W|W|
30 |---------------| |---------------| |---------------| |---------------|
31
32 Byte 1: Bit7 => Y overflow
33 Bit6 => X overflow
34 Bit5 => Y sign bit
35 Bit4 => X sign bit
36 Bit3 => 1
37 Bit2 => Middle Button, 1 is pressed, 0 is not pressed.
38 Bit1 => Right Button, 1 is pressed, 0 is not pressed.
39 Bit0 => Left Button, 1 is pressed, 0 is not pressed.
40 Byte 2: X Movement(9-bit 2's complement integers)
41 Byte 3: Y Movement(9-bit 2's complement integers)
42 Byte 4: Bit3~Bit0 => the scrolling wheel's movement since the last data report.
43 valid values, -8 ~ +7
44 Bit4 => 1 = 4th mouse button is pressed, Forward one page.
45 0 = 4th mouse button is not pressed.
46 Bit5 => 1 = 5th mouse button is pressed, Backward one page.
47 0 = 5th mouse button is not pressed.
48
49 B) MSID 6: Horizontal and Vertical scrolling
50
51 - Set bit 1 in register 0x40 to 1
52
53 FSP replaces scrolling wheel's movement as 4 bits to show horizontal and
54 vertical scrolling.
55
56 ::
57
58 Packet 1
59 Bit 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
60 BYTE |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
61 1 |Y|X|y|x|1|M|R|L| 2 |X|X|X|X|X|X|X|X| 3 |Y|Y|Y|Y|Y|Y|Y|Y| 4 | | |B|F|r|l|u|d|
62 |---------------| |---------------| |---------------| |---------------|
63
64 Byte 1: Bit7 => Y overflow
65 Bit6 => X overflow
66 Bit5 => Y sign bit
67 Bit4 => X sign bit
68 Bit3 => 1
69 Bit2 => Middle Button, 1 is pressed, 0 is not pressed.
70 Bit1 => Right Button, 1 is pressed, 0 is not pressed.
71 Bit0 => Left Button, 1 is pressed, 0 is not pressed.
72 Byte 2: X Movement(9-bit 2's complement integers)
73 Byte 3: Y Movement(9-bit 2's complement integers)
74 Byte 4: Bit0 => the Vertical scrolling movement downward.
75 Bit1 => the Vertical scrolling movement upward.
76 Bit2 => the Horizontal scrolling movement leftward.
77 Bit3 => the Horizontal scrolling movement rightward.
78 Bit4 => 1 = 4th mouse button is pressed, Forward one page.
79 0 = 4th mouse button is not pressed.
80 Bit5 => 1 = 5th mouse button is pressed, Backward one page.
81 0 = 5th mouse button is not pressed.
82
83 C) MSID 7
84
85 FSP uses 2 packets (8 Bytes) to represent Absolute Position.
86 so we have PACKET NUMBER to identify packets.
87
88 If PACKET NUMBER is 0, the packet is Packet 1.
89 If PACKET NUMBER is 1, the packet is Packet 2.
90 Please count this number in program.
91
92 MSID6 special packet will be enable at the same time when enable MSID 7.
93
94 Absolute position for STL3886-G0
95 ================================
96
97 1. Set bit 2 or 3 in register 0x40 to 1
98 2. Set bit 6 in register 0x40 to 1
99
100 ::
101
102 Packet 1 (ABSOLUTE POSITION)
103 Bit 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
104 BYTE |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
105 1 |0|1|V|1|1|M|R|L| 2 |X|X|X|X|X|X|X|X| 3 |Y|Y|Y|Y|Y|Y|Y|Y| 4 |r|l|d|u|X|X|Y|Y|
106 |---------------| |---------------| |---------------| |---------------|
107
108 Byte 1: Bit7~Bit6 => 00, Normal data packet
109 => 01, Absolute coordination packet
110 => 10, Notify packet
111 Bit5 => valid bit
112 Bit4 => 1
113 Bit3 => 1
114 Bit2 => Middle Button, 1 is pressed, 0 is not pressed.
115 Bit1 => Right Button, 1 is pressed, 0 is not pressed.
116 Bit0 => Left Button, 1 is pressed, 0 is not pressed.
117 Byte 2: X coordinate (xpos[9:2])
118 Byte 3: Y coordinate (ypos[9:2])
119 Byte 4: Bit1~Bit0 => Y coordinate (xpos[1:0])
120 Bit3~Bit2 => X coordinate (ypos[1:0])
121 Bit4 => scroll up
122 Bit5 => scroll down
123 Bit6 => scroll left
124 Bit7 => scroll right
125
126 Notify Packet for G0
127 Bit 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
128 BYTE |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
129 1 |1|0|0|1|1|M|R|L| 2 |C|C|C|C|C|C|C|C| 3 |M|M|M|M|M|M|M|M| 4 |0|0|0|0|0|0|0|0|
130 |---------------| |---------------| |---------------| |---------------|
131
132 Byte 1: Bit7~Bit6 => 00, Normal data packet
133 => 01, Absolute coordination packet
134 => 10, Notify packet
135 Bit5 => 0
136 Bit4 => 1
137 Bit3 => 1
138 Bit2 => Middle Button, 1 is pressed, 0 is not pressed.
139 Bit1 => Right Button, 1 is pressed, 0 is not pressed.
140 Bit0 => Left Button, 1 is pressed, 0 is not pressed.
141 Byte 2: Message Type => 0x5A (Enable/Disable status packet)
142 Mode Type => 0xA5 (Normal/Icon mode status)
143 Byte 3: Message Type => 0x00 (Disabled)
144 => 0x01 (Enabled)
145 Mode Type => 0x00 (Normal)
146 => 0x01 (Icon)
147 Byte 4: Bit7~Bit0 => Don't Care
148
149 Absolute position for STL3888-Ax
150 ================================
151
152 ::
153
154 Packet 1 (ABSOLUTE POSITION)
155 Bit 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
156 BYTE |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
157 1 |0|1|V|A|1|L|0|1| 2 |X|X|X|X|X|X|X|X| 3 |Y|Y|Y|Y|Y|Y|Y|Y| 4 |x|x|y|y|X|X|Y|Y|
158 |---------------| |---------------| |---------------| |---------------|
159
160 Byte 1: Bit7~Bit6 => 00, Normal data packet
161 => 01, Absolute coordination packet
162 => 10, Notify packet
163 => 11, Normal data packet with on-pad click
164 Bit5 => Valid bit, 0 means that the coordinate is invalid or finger up.
165 When both fingers are up, the last two reports have zero valid
166 bit.
167 Bit4 => arc
168 Bit3 => 1
169 Bit2 => Left Button, 1 is pressed, 0 is released.
170 Bit1 => 0
171 Bit0 => 1
172 Byte 2: X coordinate (xpos[9:2])
173 Byte 3: Y coordinate (ypos[9:2])
174 Byte 4: Bit1~Bit0 => Y coordinate (xpos[1:0])
175 Bit3~Bit2 => X coordinate (ypos[1:0])
176 Bit5~Bit4 => y1_g
177 Bit7~Bit6 => x1_g
178
179 Packet 2 (ABSOLUTE POSITION)
180 Bit 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
181 BYTE |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
182 1 |0|1|V|A|1|R|1|0| 2 |X|X|X|X|X|X|X|X| 3 |Y|Y|Y|Y|Y|Y|Y|Y| 4 |x|x|y|y|X|X|Y|Y|
183 |---------------| |---------------| |---------------| |---------------|
184
185 Byte 1: Bit7~Bit6 => 00, Normal data packet
186 => 01, Absolute coordinates packet
187 => 10, Notify packet
188 => 11, Normal data packet with on-pad click
189 Bit5 => Valid bit, 0 means that the coordinate is invalid or finger up.
190 When both fingers are up, the last two reports have zero valid
191 bit.
192 Bit4 => arc
193 Bit3 => 1
194 Bit2 => Right Button, 1 is pressed, 0 is released.
195 Bit1 => 1
196 Bit0 => 0
197 Byte 2: X coordinate (xpos[9:2])
198 Byte 3: Y coordinate (ypos[9:2])
199 Byte 4: Bit1~Bit0 => Y coordinate (xpos[1:0])
200 Bit3~Bit2 => X coordinate (ypos[1:0])
201 Bit5~Bit4 => y2_g
202 Bit7~Bit6 => x2_g
203
204 Notify Packet for STL3888-Ax
205 Bit 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
206 BYTE |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
207 1 |1|0|1|P|1|M|R|L| 2 |C|C|C|C|C|C|C|C| 3 |0|0|F|F|0|0|0|i| 4 |r|l|d|u|0|0|0|0|
208 |---------------| |---------------| |---------------| |---------------|
209
210 Byte 1: Bit7~Bit6 => 00, Normal data packet
211 => 01, Absolute coordinates packet
212 => 10, Notify packet
213 => 11, Normal data packet with on-pad click
214 Bit5 => 1
215 Bit4 => when in absolute coordinates mode (valid when EN_PKT_GO is 1):
216 0: left button is generated by the on-pad command
217 1: left button is generated by the external button
218 Bit3 => 1
219 Bit2 => Middle Button, 1 is pressed, 0 is not pressed.
220 Bit1 => Right Button, 1 is pressed, 0 is not pressed.
221 Bit0 => Left Button, 1 is pressed, 0 is not pressed.
222 Byte 2: Message Type => 0xB7 (Multi Finger, Multi Coordinate mode)
223 Byte 3: Bit7~Bit6 => Don't care
224 Bit5~Bit4 => Number of fingers
225 Bit3~Bit1 => Reserved
226 Bit0 => 1: enter gesture mode; 0: leaving gesture mode
227 Byte 4: Bit7 => scroll right button
228 Bit6 => scroll left button
229 Bit5 => scroll down button
230 Bit4 => scroll up button
231 * Note that if gesture and additional button (Bit4~Bit7)
232 happen at the same time, the button information will not
233 be sent.
234 Bit3~Bit0 => Reserved
235
236 Sample sequence of Multi-finger, Multi-coordinate mode:
237
238 notify packet (valid bit == 1), abs pkt 1, abs pkt 2, abs pkt 1,
239 abs pkt 2, ..., notify packet (valid bit == 0)
240
241 Absolute position for STL3888-B0
242 ================================
243
244 ::
245
246 Packet 1(ABSOLUTE POSITION)
247 Bit 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
248 BYTE |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
249 1 |0|1|V|F|1|0|R|L| 2 |X|X|X|X|X|X|X|X| 3 |Y|Y|Y|Y|Y|Y|Y|Y| 4 |r|l|u|d|X|X|Y|Y|
250 |---------------| |---------------| |---------------| |---------------|
251
252 Byte 1: Bit7~Bit6 => 00, Normal data packet
253 => 01, Absolute coordinates packet
254 => 10, Notify packet
255 => 11, Normal data packet with on-pad click
256 Bit5 => Valid bit, 0 means that the coordinate is invalid or finger up.
257 When both fingers are up, the last two reports have zero valid
258 bit.
259 Bit4 => finger up/down information. 1: finger down, 0: finger up.
260 Bit3 => 1
261 Bit2 => finger index, 0 is the first finger, 1 is the second finger.
262 Bit1 => Right Button, 1 is pressed, 0 is not pressed.
263 Bit0 => Left Button, 1 is pressed, 0 is not pressed.
264 Byte 2: X coordinate (xpos[9:2])
265 Byte 3: Y coordinate (ypos[9:2])
266 Byte 4: Bit1~Bit0 => Y coordinate (xpos[1:0])
267 Bit3~Bit2 => X coordinate (ypos[1:0])
268 Bit4 => scroll down button
269 Bit5 => scroll up button
270 Bit6 => scroll left button
271 Bit7 => scroll right button
272
273 Packet 2 (ABSOLUTE POSITION)
274 Bit 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
275 BYTE |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
276 1 |0|1|V|F|1|1|R|L| 2 |X|X|X|X|X|X|X|X| 3 |Y|Y|Y|Y|Y|Y|Y|Y| 4 |r|l|u|d|X|X|Y|Y|
277 |---------------| |---------------| |---------------| |---------------|
278
279 Byte 1: Bit7~Bit6 => 00, Normal data packet
280 => 01, Absolute coordination packet
281 => 10, Notify packet
282 => 11, Normal data packet with on-pad click
283 Bit5 => Valid bit, 0 means that the coordinate is invalid or finger up.
284 When both fingers are up, the last two reports have zero valid
285 bit.
286 Bit4 => finger up/down information. 1: finger down, 0: finger up.
287 Bit3 => 1
288 Bit2 => finger index, 0 is the first finger, 1 is the second finger.
289 Bit1 => Right Button, 1 is pressed, 0 is not pressed.
290 Bit0 => Left Button, 1 is pressed, 0 is not pressed.
291 Byte 2: X coordinate (xpos[9:2])
292 Byte 3: Y coordinate (ypos[9:2])
293 Byte 4: Bit1~Bit0 => Y coordinate (xpos[1:0])
294 Bit3~Bit2 => X coordinate (ypos[1:0])
295 Bit4 => scroll down button
296 Bit5 => scroll up button
297 Bit6 => scroll left button
298 Bit7 => scroll right button
299
300 Notify Packet for STL3888-B0::
301
302 Bit 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
303 BYTE |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
304 1 |1|0|1|P|1|M|R|L| 2 |C|C|C|C|C|C|C|C| 3 |0|0|F|F|0|0|0|i| 4 |r|l|u|d|0|0|0|0|
305 |---------------| |---------------| |---------------| |---------------|
306
307 Byte 1: Bit7~Bit6 => 00, Normal data packet
308 => 01, Absolute coordination packet
309 => 10, Notify packet
310 => 11, Normal data packet with on-pad click
311 Bit5 => 1
312 Bit4 => when in absolute coordinates mode (valid when EN_PKT_GO is 1):
313 0: left button is generated by the on-pad command
314 1: left button is generated by the external button
315 Bit3 => 1
316 Bit2 => Middle Button, 1 is pressed, 0 is not pressed.
317 Bit1 => Right Button, 1 is pressed, 0 is not pressed.
318 Bit0 => Left Button, 1 is pressed, 0 is not pressed.
319 Byte 2: Message Type => 0xB7 (Multi Finger, Multi Coordinate mode)
320 Byte 3: Bit7~Bit6 => Don't care
321 Bit5~Bit4 => Number of fingers
322 Bit3~Bit1 => Reserved
323 Bit0 => 1: enter gesture mode; 0: leaving gesture mode
324 Byte 4: Bit7 => scroll right button
325 Bit6 => scroll left button
326 Bit5 => scroll up button
327 Bit4 => scroll down button
328 * Note that if gesture and additional button(Bit4~Bit7)
329 happen at the same time, the button information will not
330 be sent.
331 Bit3~Bit0 => Reserved
332
333 Sample sequence of Multi-finger, Multi-coordinate mode:
334
335 notify packet (valid bit == 1), abs pkt 1, abs pkt 2, abs pkt 1,
336 abs pkt 2, ..., notify packet (valid bit == 0)
337
338 Absolute position for STL3888-Cx and STL3888-Dx
339 ===============================================
340
341 ::
342
343 Single Finger, Absolute Coordinate Mode (SFAC)
344 Bit 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
345 BYTE |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
346 1 |0|1|0|P|1|M|R|L| 2 |X|X|X|X|X|X|X|X| 3 |Y|Y|Y|Y|Y|Y|Y|Y| 4 |r|l|B|F|X|X|Y|Y|
347 |---------------| |---------------| |---------------| |---------------|
348
349 Byte 1: Bit7~Bit6 => 00, Normal data packet
350 => 01, Absolute coordinates packet
351 => 10, Notify packet
352 Bit5 => Coordinate mode(always 0 in SFAC mode):
353 0: single-finger absolute coordinates (SFAC) mode
354 1: multi-finger, multiple coordinates (MFMC) mode
355 Bit4 => 0: The LEFT button is generated by on-pad command (OPC)
356 1: The LEFT button is generated by external button
357 Default is 1 even if the LEFT button is not pressed.
358 Bit3 => Always 1, as specified by PS/2 protocol.
359 Bit2 => Middle Button, 1 is pressed, 0 is not pressed.
360 Bit1 => Right Button, 1 is pressed, 0 is not pressed.
361 Bit0 => Left Button, 1 is pressed, 0 is not pressed.
362 Byte 2: X coordinate (xpos[9:2])
363 Byte 3: Y coordinate (ypos[9:2])
364 Byte 4: Bit1~Bit0 => Y coordinate (xpos[1:0])
365 Bit3~Bit2 => X coordinate (ypos[1:0])
366 Bit4 => 4th mouse button(forward one page)
367 Bit5 => 5th mouse button(backward one page)
368 Bit6 => scroll left button
369 Bit7 => scroll right button
370
371 Multi Finger, Multiple Coordinates Mode (MFMC):
372 Bit 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
373 BYTE |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
374 1 |0|1|1|P|1|F|R|L| 2 |X|X|X|X|X|X|X|X| 3 |Y|Y|Y|Y|Y|Y|Y|Y| 4 |r|l|B|F|X|X|Y|Y|
375 |---------------| |---------------| |---------------| |---------------|
376
377 Byte 1: Bit7~Bit6 => 00, Normal data packet
378 => 01, Absolute coordination packet
379 => 10, Notify packet
380 Bit5 => Coordinate mode (always 1 in MFMC mode):
381 0: single-finger absolute coordinates (SFAC) mode
382 1: multi-finger, multiple coordinates (MFMC) mode
383 Bit4 => 0: The LEFT button is generated by on-pad command (OPC)
384 1: The LEFT button is generated by external button
385 Default is 1 even if the LEFT button is not pressed.
386 Bit3 => Always 1, as specified by PS/2 protocol.
387 Bit2 => Finger index, 0 is the first finger, 1 is the second finger.
388 If bit 1 and 0 are all 1 and bit 4 is 0, the middle external
389 button is pressed.
390 Bit1 => Right Button, 1 is pressed, 0 is not pressed.
391 Bit0 => Left Button, 1 is pressed, 0 is not pressed.
392 Byte 2: X coordinate (xpos[9:2])
393 Byte 3: Y coordinate (ypos[9:2])
394 Byte 4: Bit1~Bit0 => Y coordinate (xpos[1:0])
395 Bit3~Bit2 => X coordinate (ypos[1:0])
396 Bit4 => 4th mouse button(forward one page)
397 Bit5 => 5th mouse button(backward one page)
398 Bit6 => scroll left button
399 Bit7 => scroll right button
400
401 When one of the two fingers is up, the device will output four consecutive
402 MFMC#0 report packets with zero X and Y to represent 1st finger is up or
403 four consecutive MFMC#1 report packets with zero X and Y to represent that
404 the 2nd finger is up. On the other hand, if both fingers are up, the device
405 will output four consecutive single-finger, absolute coordinate(SFAC) packets
406 with zero X and Y.
407
408 Notify Packet for STL3888-Cx/Dx::
409
410 Bit 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
411 BYTE |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
412 1 |1|0|0|P|1|M|R|L| 2 |C|C|C|C|C|C|C|C| 3 |0|0|F|F|0|0|0|i| 4 |r|l|u|d|0|0|0|0|
413 |---------------| |---------------| |---------------| |---------------|
414
415 Byte 1: Bit7~Bit6 => 00, Normal data packet
416 => 01, Absolute coordinates packet
417 => 10, Notify packet
418 Bit5 => Always 0
419 Bit4 => 0: The LEFT button is generated by on-pad command(OPC)
420 1: The LEFT button is generated by external button
421 Default is 1 even if the LEFT button is not pressed.
422 Bit3 => 1
423 Bit2 => Middle Button, 1 is pressed, 0 is not pressed.
424 Bit1 => Right Button, 1 is pressed, 0 is not pressed.
425 Bit0 => Left Button, 1 is pressed, 0 is not pressed.
426 Byte 2: Message type:
427 0xba => gesture information
428 0xc0 => one finger hold-rotating gesture
429 Byte 3: The first parameter for the received message:
430 0xba => gesture ID (refer to the 'Gesture ID' section)
431 0xc0 => region ID
432 Byte 4: The second parameter for the received message:
433 0xba => N/A
434 0xc0 => finger up/down information
435
436 Sample sequence of Multi-finger, Multi-coordinates mode:
437
438 notify packet (valid bit == 1), MFMC packet 1 (byte 1, bit 2 == 0),
439 MFMC packet 2 (byte 1, bit 2 == 1), MFMC packet 1, MFMC packet 2,
440 ..., notify packet (valid bit == 0)
441
442 That is, when the device is in MFMC mode, the host will receive
443 interleaved absolute coordinate packets for each finger.
444
445 FSP Enable/Disable packet
446 =========================
447
448 ::
449
450 Bit 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
451 BYTE |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
452 1 |Y|X|0|0|1|M|R|L| 2 |0|1|0|1|1|0|1|E| 3 | | | | | | | | | 4 | | | | | | | | |
453 |---------------| |---------------| |---------------| |---------------|
454
455 FSP will send out enable/disable packet when FSP receive PS/2 enable/disable
456 command. Host will receive the packet which Middle, Right, Left button will
457 be set. The packet only use byte 0 and byte 1 as a pattern of original packet.
458 Ignore the other bytes of the packet.
459
460 Byte 1: Bit7 => 0, Y overflow
461 Bit6 => 0, X overflow
462 Bit5 => 0, Y sign bit
463 Bit4 => 0, X sign bit
464 Bit3 => 1
465 Bit2 => 1, Middle Button
466 Bit1 => 1, Right Button
467 Bit0 => 1, Left Button
468 Byte 2: Bit7~1 => (0101101b)
469 Bit0 => 1 = Enable
470 0 = Disable
471 Byte 3: Don't care
472 Byte 4: Don't care (MOUSE ID 3, 4)
473 Byte 5~8: Don't care (Absolute packet)
474
475 PS/2 Command Set
476 ================
477
478 FSP supports basic PS/2 commanding set and modes, refer to following URL for
479 details about PS/2 commands:
480
481 http://www.computer-engineering.org/ps2mouse/
482
483 Programming Sequence for Determining Packet Parsing Flow
484 ========================================================
485
486 1. Identify FSP by reading device ID(0x00) and version(0x01) register
487
488 2. For FSP version < STL3888 Cx, determine number of buttons by reading
489 the 'test mode status' (0x20) register::
490
491 buttons = reg[0x20] & 0x30
492
493 if buttons == 0x30 or buttons == 0x20:
494 # two/four buttons
495 Refer to 'Finger Sensing Pad PS/2 Mouse Intellimouse'
496 section A for packet parsing detail(ignore byte 4, bit ~ 7)
497 elif buttons == 0x10:
498 # 6 buttons
499 Refer to 'Finger Sensing Pad PS/2 Mouse Intellimouse'
500 section B for packet parsing detail
501 elif buttons == 0x00:
502 # 6 buttons
503 Refer to 'Finger Sensing Pad PS/2 Mouse Intellimouse'
504 section A for packet parsing detail
505
506 3. For FSP version >= STL3888 Cx:
507 Refer to 'Finger Sensing Pad PS/2 Mouse Intellimouse'
508 section A for packet parsing detail (ignore byte 4, bit ~ 7)
509
510 Programming Sequence for Register Reading/Writing
511 =================================================
512
513 Register inversion requirement:
514
515 Following values needed to be inverted(the '~' operator in C) before being
516 sent to FSP::
517
518 0xe8, 0xe9, 0xee, 0xf2, 0xf3 and 0xff.
519
520 Register swapping requirement:
521
522 Following values needed to have their higher 4 bits and lower 4 bits being
523 swapped before being sent to FSP::
524
525 10, 20, 40, 60, 80, 100 and 200.
526
527 Register reading sequence:
528
529 1. send 0xf3 PS/2 command to FSP;
530
531 2. send 0x66 PS/2 command to FSP;
532
533 3. send 0x88 PS/2 command to FSP;
534
535 4. send 0xf3 PS/2 command to FSP;
536
537 5. if the register address being to read is not required to be
538 inverted(refer to the 'Register inversion requirement' section),
539 goto step 6
540
541 a. send 0x68 PS/2 command to FSP;
542
543 b. send the inverted register address to FSP and goto step 8;
544
545 6. if the register address being to read is not required to be
546 swapped(refer to the 'Register swapping requirement' section),
547 goto step 7
548
549 a. send 0xcc PS/2 command to FSP;
550
551 b. send the swapped register address to FSP and goto step 8;
552
553 7. send 0x66 PS/2 command to FSP;
554
555 a. send the original register address to FSP and goto step 8;
556
557 8. send 0xe9(status request) PS/2 command to FSP;
558
559 9. the 4th byte of the response read from FSP should be the
560 requested register value(?? indicates don't care byte)::
561
562 host: 0xe9
563 3888: 0xfa (??) (??) (val)
564
565 * Note that since the Cx release, the hardware will return 1's
566 complement of the register value at the 3rd byte of status request
567 result::
568
569 host: 0xe9
570 3888: 0xfa (??) (~val) (val)
571
572 Register writing sequence:
573
574 1. send 0xf3 PS/2 command to FSP;
575
576 2. if the register address being to write is not required to be
577 inverted(refer to the 'Register inversion requirement' section),
578 goto step 3
579
580 a. send 0x74 PS/2 command to FSP;
581
582 b. send the inverted register address to FSP and goto step 5;
583
584 3. if the register address being to write is not required to be
585 swapped(refer to the 'Register swapping requirement' section),
586 goto step 4
587
588 a. send 0x77 PS/2 command to FSP;
589
590 b. send the swapped register address to FSP and goto step 5;
591
592 4. send 0x55 PS/2 command to FSP;
593
594 a. send the register address to FSP and goto step 5;
595
596 5. send 0xf3 PS/2 command to FSP;
597
598 6. if the register value being to write is not required to be
599 inverted(refer to the 'Register inversion requirement' section),
600 goto step 7
601
602 a. send 0x47 PS/2 command to FSP;
603
604 b. send the inverted register value to FSP and goto step 9;
605
606 7. if the register value being to write is not required to be
607 swapped(refer to the 'Register swapping requirement' section),
608 goto step 8
609
610 a. send 0x44 PS/2 command to FSP;
611
612 b. send the swapped register value to FSP and goto step 9;
613
614 8. send 0x33 PS/2 command to FSP;
615
616 a. send the register value to FSP;
617
618 9. the register writing sequence is completed.
619
620 * Since the Cx release, the hardware will return 1's
621 complement of the register value at the 3rd byte of status request
622 result. Host can optionally send another 0xe9 (status request) PS/2
623 command to FSP at the end of register writing to verify that the
624 register writing operation is successful (?? indicates don't care
625 byte)::
626
627 host: 0xe9
628 3888: 0xfa (??) (~val) (val)
629
630 Programming Sequence for Page Register Reading/Writing
631 ======================================================
632
633 In order to overcome the limitation of maximum number of registers
634 supported, the hardware separates register into different groups called
635 'pages.' Each page is able to include up to 255 registers.
636
637 The default page after power up is 0x82; therefore, if one has to get
638 access to register 0x8301, one has to use following sequence to switch
639 to page 0x83, then start reading/writing from/to offset 0x01 by using
640 the register read/write sequence described in previous section.
641
642 Page register reading sequence:
643
644 1. send 0xf3 PS/2 command to FSP;
645
646 2. send 0x66 PS/2 command to FSP;
647
648 3. send 0x88 PS/2 command to FSP;
649
650 4. send 0xf3 PS/2 command to FSP;
651
652 5. send 0x83 PS/2 command to FSP;
653
654 6. send 0x88 PS/2 command to FSP;
655
656 7. send 0xe9(status request) PS/2 command to FSP;
657
658 8. the response read from FSP should be the requested page value.
659
660
661 Page register writing sequence:
662
663 1. send 0xf3 PS/2 command to FSP;
664
665 2. send 0x38 PS/2 command to FSP;
666
667 3. send 0x88 PS/2 command to FSP;
668
669 4. send 0xf3 PS/2 command to FSP;
670
671 5. if the page address being written is not required to be
672 inverted(refer to the 'Register inversion requirement' section),
673 goto step 6
674
675 a. send 0x47 PS/2 command to FSP;
676
677 b. send the inverted page address to FSP and goto step 9;
678
679 6. if the page address being written is not required to be
680 swapped(refer to the 'Register swapping requirement' section),
681 goto step 7
682
683 a. send 0x44 PS/2 command to FSP;
684
685 b. send the swapped page address to FSP and goto step 9;
686
687 7. send 0x33 PS/2 command to FSP;
688
689 8. send the page address to FSP;
690
691 9. the page register writing sequence is completed.
692
693 Gesture ID
694 ==========
695
696 Unlike other devices which sends multiple fingers' coordinates to host,
697 FSP processes multiple fingers' coordinates internally and convert them
698 into a 8 bits integer, namely 'Gesture ID.' Following is a list of
699 supported gesture IDs:
700
701 ======= ==================================
702 ID Description
703 ======= ==================================
704 0x86 2 finger straight up
705 0x82 2 finger straight down
706 0x80 2 finger straight right
707 0x84 2 finger straight left
708 0x8f 2 finger zoom in
709 0x8b 2 finger zoom out
710 0xc0 2 finger curve, counter clockwise
711 0xc4 2 finger curve, clockwise
712 0x2e 3 finger straight up
713 0x2a 3 finger straight down
714 0x28 3 finger straight right
715 0x2c 3 finger straight left
716 0x38 palm
717 ======= ==================================
718
719 Register Listing
720 ================
721
722 Registers are represented in 16 bits values. The higher 8 bits represent
723 the page address and the lower 8 bits represent the relative offset within
724 that particular page. Refer to the 'Programming Sequence for Page Register
725 Reading/Writing' section for instructions on how to change current page
726 address::
727
728 offset width default r/w name
729 0x8200 bit7~bit0 0x01 RO device ID
730
731 0x8201 bit7~bit0 RW version ID
732 0xc1: STL3888 Ax
733 0xd0 ~ 0xd2: STL3888 Bx
734 0xe0 ~ 0xe1: STL3888 Cx
735 0xe2 ~ 0xe3: STL3888 Dx
736
737 0x8202 bit7~bit0 0x01 RO vendor ID
738
739 0x8203 bit7~bit0 0x01 RO product ID
740
741 0x8204 bit3~bit0 0x01 RW revision ID
742
743 0x820b test mode status 1
744 bit3 1 RO 0: rotate 180 degree
745 1: no rotation
746 *only supported by H/W prior to Cx
747
748 0x820f register file page control
749 bit2 0 RW 1: rotate 180 degree
750 0: no rotation
751 *supported since Cx
752
753 bit0 0 RW 1 to enable page 1 register files
754 *only supported by H/W prior to Cx
755
756 0x8210 RW system control 1
757 bit0 1 RW Reserved, must be 1
758 bit1 0 RW Reserved, must be 0
759 bit4 0 RW Reserved, must be 0
760 bit5 1 RW register clock gating enable
761 0: read only, 1: read/write enable
762 (Note that following registers does not require clock gating being
763 enabled prior to write: 05 06 07 08 09 0c 0f 10 11 12 16 17 18 23 2e
764 40 41 42 43. In addition to that, this bit must be 1 when gesture
765 mode is enabled)
766
767 0x8220 test mode status
768 bit5~bit4 RO number of buttons
769 11 => 2, lbtn/rbtn
770 10 => 4, lbtn/rbtn/scru/scrd
771 01 => 6, lbtn/rbtn/scru/scrd/scrl/scrr
772 00 => 6, lbtn/rbtn/scru/scrd/fbtn/bbtn
773 *only supported by H/W prior to Cx
774
775 0x8231 RW on-pad command detection
776 bit7 0 RW on-pad command left button down tag
777 enable
778 0: disable, 1: enable
779 *only supported by H/W prior to Cx
780
781 0x8234 RW on-pad command control 5
782 bit4~bit0 0x05 RW XLO in 0s/4/1, so 03h = 0010.1b = 2.5
783 (Note that position unit is in 0.5 scanline)
784 *only supported by H/W prior to Cx
785
786 bit7 0 RW on-pad tap zone enable
787 0: disable, 1: enable
788 *only supported by H/W prior to Cx
789
790 0x8235 RW on-pad command control 6
791 bit4~bit0 0x1d RW XHI in 0s/4/1, so 19h = 1100.1b = 12.5
792 (Note that position unit is in 0.5 scanline)
793 *only supported by H/W prior to Cx
794
795 0x8236 RW on-pad command control 7
796 bit4~bit0 0x04 RW YLO in 0s/4/1, so 03h = 0010.1b = 2.5
797 (Note that position unit is in 0.5 scanline)
798 *only supported by H/W prior to Cx
799
800 0x8237 RW on-pad command control 8
801 bit4~bit0 0x13 RW YHI in 0s/4/1, so 11h = 1000.1b = 8.5
802 (Note that position unit is in 0.5 scanline)
803 *only supported by H/W prior to Cx
804
805 0x8240 RW system control 5
806 bit1 0 RW FSP Intellimouse mode enable
807 0: disable, 1: enable
808 *only supported by H/W prior to Cx
809
810 bit2 0 RW movement + abs. coordinate mode enable
811 0: disable, 1: enable
812 (Note that this function has the functionality of bit 1 even when
813 bit 1 is not set. However, the format is different from that of bit 1.
814 In addition, when bit 1 and bit 2 are set at the same time, bit 2 will
815 override bit 1.)
816 *only supported by H/W prior to Cx
817
818 bit3 0 RW abs. coordinate only mode enable
819 0: disable, 1: enable
820 (Note that this function has the functionality of bit 1 even when
821 bit 1 is not set. However, the format is different from that of bit 1.
822 In addition, when bit 1, bit 2 and bit 3 are set at the same time,
823 bit 3 will override bit 1 and 2.)
824 *only supported by H/W prior to Cx
825
826 bit5 0 RW auto switch enable
827 0: disable, 1: enable
828 *only supported by H/W prior to Cx
829
830 bit6 0 RW G0 abs. + notify packet format enable
831 0: disable, 1: enable
832 (Note that the absolute/relative coordinate output still depends on
833 bit 2 and 3. That is, if any of those bit is 1, host will receive
834 absolute coordinates; otherwise, host only receives packets with
835 relative coordinate.)
836 *only supported by H/W prior to Cx
837
838 bit7 0 RW EN_PS2_F2: PS/2 gesture mode 2nd
839 finger packet enable
840 0: disable, 1: enable
841 *only supported by H/W prior to Cx
842
843 0x8243 RW on-pad control
844 bit0 0 RW on-pad control enable
845 0: disable, 1: enable
846 (Note that if this bit is cleared, bit 3/5 will be ineffective)
847 *only supported by H/W prior to Cx
848
849 bit3 0 RW on-pad fix vertical scrolling enable
850 0: disable, 1: enable
851 *only supported by H/W prior to Cx
852
853 bit5 0 RW on-pad fix horizontal scrolling enable
854 0: disable, 1: enable
855 *only supported by H/W prior to Cx
856
857 0x8290 RW software control register 1
858 bit0 0 RW absolute coordination mode
859 0: disable, 1: enable
860 *supported since Cx
861
862 bit1 0 RW gesture ID output
863 0: disable, 1: enable
864 *supported since Cx
865
866 bit2 0 RW two fingers' coordinates output
867 0: disable, 1: enable
868 *supported since Cx
869
870 bit3 0 RW finger up one packet output
871 0: disable, 1: enable
872 *supported since Cx
873
874 bit4 0 RW absolute coordination continuous mode
875 0: disable, 1: enable
876 *supported since Cx
877
878 bit6~bit5 00 RW gesture group selection
879 00: basic
880 01: suite
881 10: suite pro
882 11: advanced
883 *supported since Cx
884
885 bit7 0 RW Bx packet output compatible mode
886 0: disable, 1: enable
887 *supported since Cx
888 *supported since Cx
889
890
891 0x833d RW on-pad command control 1
892 bit7 1 RW on-pad command detection enable
893 0: disable, 1: enable
894 *supported since Cx
895
896 0x833e RW on-pad command detection
897 bit7 0 RW on-pad command left button down tag
898 enable. Works only in H/W based PS/2
899 data packet mode.
900 0: disable, 1: enable
901 *supported since Cx
902

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

Intellimouse MSID 4·6·7 모드

1-93

이 문서는 Sentelic Finger Sensing Pad(FSP) 터치패드의 PS/2 패킷과 프로그래밍 절차를 설명하며 마지막 갱신일은 2011년 12월 7일입니다. 첫 절은 스크롤 휠과 4·5번 버튼을 포함한 Intellimouse 호환 모드를 다룹니다.

MSID 4를 선택하려면 sample rate를 200, 200, 80 순서로 설정한 뒤 `Get device ID` 명령 `0xF2`를 보내 응답을 기다립니다. FSP가 `0x04`를 반환하면 4바이트 패킷에서 상대 X/Y, 세 기본 버튼, 휠 이동, 앞으로·뒤로 버튼을 읽습니다.

MSID 4 패킷
바이트비트의미
17·6Y overflow, X overflow
15·4Y sign, X sign
13항상 1
12·1·0Middle, Right, Left 버튼
27~0X movement 하위 8비트; sign과 합쳐 9비트 2의 보수
37~0Y movement 하위 8비트; sign과 합쳐 9비트 2의 보수
43~0마지막 보고 이후 휠 이동, -8~+7
444th button: Forward page
455th button: Backward page

원문의 4바이트 비트 그림을 필드별로 다시 구성했습니다.

MSID 6은 레지스터 `0x40` bit 1을 1로 설정합니다. 첫 세 바이트는 MSID 4와 같고, byte 4의 하위 네 비트가 휠 수치 대신 아래·위·왼쪽·오른쪽 스크롤 버튼을 각각 나타냅니다. bit 4와 5는 계속 Forward와 Backward 버튼입니다.

MSID 6 byte 4
비트신호
0Vertical scroll downward
1Vertical scroll upward
2Horizontal scroll leftward
3Horizontal scroll rightward
44th button, Forward one page
55th button, Backward one page

수직·수평 스크롤과 페이지 버튼의 비트 배치입니다.

MSID 7은 절대 위치 하나를 4바이트 패킷 두 개, 총 8바이트로 표현합니다. 프로그램이 packet number 0과 1을 직접 세어 Packet 1과 Packet 2를 구분해야 합니다. MSID 7을 활성화하면 MSID 6의 special packet도 동시에 활성화됩니다.

MSID 모드 비교
MSID활성화주요 출력
4sample rate 200, 200, 80 후 `0xF2`상대 X/Y, 4비트 휠, Forward/Backward
6register `0x40` bit 1상대 X/Y, 4방향 스크롤, Forward/Backward
7절대 좌표 설정두 4바이트 패킷의 8바이트 절대 위치

모드 선택과 주요 데이터 형식을 비교합니다.

Intellimouse 모드 판별
필요한 sample-rate 또는 register bit 설정`Get device ID`로 MSID 확인MSID 4·6이면 4바이트 상대 패킷 해석MSID 7이면 packet number를 0·1로 세어 8바이트 결합동시에 들어오는 MSID 6 special packet도 별도 분류

초기화에서 수신 패킷 형식을 정하는 흐름입니다.

.. include:: <isonum.txt>

=================
Sentelic Touchpad
=================


:Copyright: |copy| 2002-2011 Sentelic Corporation.

:Last update: Dec-07-2011

Finger Sensing Pad Intellimouse Mode (scrolling wheel, 4th and 5th buttons)
============================================================================

A) MSID 4: Scrolling wheel mode plus Forward page(4th button) and Backward
   page (5th button)

1. Set sample rate to 200;
2. Set sample rate to 200;
3. Set sample rate to 80;
4. Issuing the "Get device ID" command (0xF2) and waits for the response;
5. FSP will respond 0x04.

::

    Packet 1
    Bit 7 6 5 4 3 2 1 0       7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0
    BYTE  |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
      1   |Y|X|y|x|1|M|R|L|  2  |X|X|X|X|X|X|X|X|  3 |Y|Y|Y|Y|Y|Y|Y|Y|  4 | | |B|F|W|W|W|W|
          |---------------|     |---------------|    |---------------|    |---------------|

    Byte 1: Bit7 => Y overflow
            Bit6 => X overflow
            Bit5 => Y sign bit
            Bit4 => X sign bit
            Bit3 => 1
            Bit2 => Middle Button, 1 is pressed, 0 is not pressed.
            Bit1 => Right Button, 1 is pressed, 0 is not pressed.
            Bit0 => Left Button, 1 is pressed, 0 is not pressed.
    Byte 2: X Movement(9-bit 2's complement integers)
    Byte 3: Y Movement(9-bit 2's complement integers)
    Byte 4: Bit3~Bit0 => the scrolling wheel's movement since the last data report.
                        valid values, -8 ~ +7
            Bit4 => 1 = 4th mouse button is pressed, Forward one page.
                    0 = 4th mouse button is not pressed.
            Bit5 => 1 = 5th mouse button is pressed, Backward one page.
                    0 = 5th mouse button is not pressed.

B) MSID 6: Horizontal and Vertical scrolling

- Set bit 1 in register 0x40 to 1

FSP replaces scrolling wheel's movement as 4 bits to show horizontal and
vertical scrolling.

::

    Packet 1
    Bit 7 6 5 4 3 2 1 0       7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0
    BYTE  |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
      1   |Y|X|y|x|1|M|R|L|  2  |X|X|X|X|X|X|X|X|  3 |Y|Y|Y|Y|Y|Y|Y|Y|  4 | | |B|F|r|l|u|d|
          |---------------|     |---------------|    |---------------|    |---------------|

    Byte 1: Bit7 => Y overflow
            Bit6 => X overflow
            Bit5 => Y sign bit
            Bit4 => X sign bit
            Bit3 => 1
            Bit2 => Middle Button, 1 is pressed, 0 is not pressed.
            Bit1 => Right Button, 1 is pressed, 0 is not pressed.
            Bit0 => Left Button, 1 is pressed, 0 is not pressed.
    Byte 2: X Movement(9-bit 2's complement integers)
    Byte 3: Y Movement(9-bit 2's complement integers)
    Byte 4: Bit0 => the Vertical scrolling movement downward.
            Bit1 => the Vertical scrolling movement upward.
            Bit2 => the Horizontal scrolling movement leftward.
            Bit3 => the Horizontal scrolling movement rightward.
            Bit4 => 1 = 4th mouse button is pressed, Forward one page.
                    0 = 4th mouse button is not pressed.
            Bit5 => 1 = 5th mouse button is pressed, Backward one page.
                    0 = 5th mouse button is not pressed.

C) MSID 7

FSP uses 2 packets (8 Bytes) to represent Absolute Position.
so we have PACKET NUMBER to identify packets.

  If PACKET NUMBER is 0, the packet is Packet 1.
  If PACKET NUMBER is 1, the packet is Packet 2.
  Please count this number in program.

MSID6 special packet will be enable at the same time when enable MSID 7.

STL3886-G0와 STL3888-Ax 절대 좌표

94-240

STL3886-G0 절대 위치는 레지스터 `0x40`의 bit 2 또는 3을 1로 하고 bit 6도 1로 설정합니다. byte 1의 상위 두 비트는 `00` normal, `01` absolute coordinate, `10` notify를 구분하고 bit 5는 valid입니다.

STL3886-G0 절대 좌표 패킷
바이트비트의미
17~6`00` normal, `01` absolute, `10` notify
15Valid
14·3각각 1
12·1·0Middle, Right, Left
27~0X coordinate `[9:2]`
37~0Y coordinate `[9:2]`
41~0원문 표기의 Y coordinate 하위 2비트
43~2원문 표기의 X coordinate 하위 2비트
44·5·6·7scroll up, down, left, right

4바이트 좌표와 스크롤 비트입니다.

G0 notify packet
필드의미
Byte 2 Message Type`0x5A`Enable/Disable status packet
Byte 2 Mode Type`0xA5`Normal/Icon mode status
Byte 3 Message Type`0x00` / `0x01`Disabled / Enabled
Byte 3 Mode Type`0x00` / `0x01`Normal / Icon
Byte 4Don't care해석하지 않음

Message Type과 Mode Type에 따라 byte 2·3을 해석합니다.

STL3888-Ax는 두 절대 좌표 패킷을 번갈아 보내며 Packet 1은 왼쪽 버튼과 첫 좌표 보조값 `x1_g`, `y1_g`, Packet 2는 오른쪽 버튼과 `x2_g`, `y2_g`를 담습니다. byte 1의 `01`은 absolute, `10`은 notify, `11`은 on-pad click을 포함한 normal packet입니다.

STL3888-Ax Packet 1·2
필드Packet 1Packet 2
Byte 1 bit 5Valid; 0이면 invalid 또는 finger up동일
Byte 1 bit 4arcarc
Byte 1 bit 2Left ButtonRight Button
Byte 1 bits 1~0`01``10`
Byte 2X `[9:2]`X `[9:2]`
Byte 3Y `[9:2]`Y `[9:2]`
Byte 4 bits 5~4`y1_g``y2_g`
Byte 4 bits 7~6`x1_g``x2_g`

두 절대 좌표 패킷의 공통점과 구분 비트를 비교합니다.

두 손가락을 모두 떼면 마지막 두 report의 valid bit가 0입니다. Ax notify의 byte 2 `0xB7`은 Multi Finger, Multi Coordinate 모드이고 byte 3 bits 5~4는 손가락 수, bit 0은 gesture mode 진입 1 또는 이탈 0입니다.

STL3888-Ax notify
바이트/비트의미
Byte 1 bit 4`EN_PKT_GO=1`일 때 left button 출처: 0 on-pad, 1 external
Byte 2`0xB7` Multi Finger, Multi Coordinate
Byte 3 bits 5~4Number of fingers
Byte 3 bit 01 enter gesture mode, 0 leave gesture mode
Byte 4 bits 7~4scroll right, left, down, up
Gesture와 추가 버튼 동시추가 버튼 정보는 전송되지 않음

다중 손가락 통지와 추가 버튼 필드입니다.

Ax MFMC 보고 시퀀스
Valid=1인 notify packet으로 MFMC 시작Absolute Packet 1 수신Absolute Packet 2 수신Packet 1과 2를 계속 교대로 수신Valid=0인 notify packet으로 MFMC 종료

통지로 둘러싸인 두 절대 패킷의 반복 순서입니다.

Absolute position for STL3886-G0
================================

1. Set bit 2 or 3 in register 0x40 to 1
2. Set bit 6 in register 0x40 to 1

::

    Packet 1 (ABSOLUTE POSITION)
    Bit 7 6 5 4 3 2 1 0       7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0
    BYTE  |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
      1   |0|1|V|1|1|M|R|L|  2  |X|X|X|X|X|X|X|X|  3 |Y|Y|Y|Y|Y|Y|Y|Y|  4 |r|l|d|u|X|X|Y|Y|
          |---------------|     |---------------|    |---------------|    |---------------|

    Byte 1: Bit7~Bit6 => 00, Normal data packet
                    => 01, Absolute coordination packet
                    => 10, Notify packet
            Bit5 => valid bit
            Bit4 => 1
            Bit3 => 1
            Bit2 => Middle Button, 1 is pressed, 0 is not pressed.
            Bit1 => Right Button, 1 is pressed, 0 is not pressed.
            Bit0 => Left Button, 1 is pressed, 0 is not pressed.
    Byte 2: X coordinate (xpos[9:2])
    Byte 3: Y coordinate (ypos[9:2])
    Byte 4: Bit1~Bit0 => Y coordinate (xpos[1:0])
            Bit3~Bit2 => X coordinate (ypos[1:0])
            Bit4 => scroll up
            Bit5 => scroll down
            Bit6 => scroll left
            Bit7 => scroll right

    Notify Packet for G0
    Bit 7 6 5 4 3 2 1 0       7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0
    BYTE  |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
      1   |1|0|0|1|1|M|R|L|  2  |C|C|C|C|C|C|C|C|  3 |M|M|M|M|M|M|M|M|  4 |0|0|0|0|0|0|0|0|
          |---------------|     |---------------|    |---------------|    |---------------|

    Byte 1: Bit7~Bit6 => 00, Normal data packet
                    => 01, Absolute coordination packet
                    => 10, Notify packet
            Bit5 => 0
            Bit4 => 1
            Bit3 => 1
            Bit2 => Middle Button, 1 is pressed, 0 is not pressed.
            Bit1 => Right Button, 1 is pressed, 0 is not pressed.
            Bit0 => Left Button, 1 is pressed, 0 is not pressed.
    Byte 2: Message Type => 0x5A (Enable/Disable status packet)
            Mode Type => 0xA5 (Normal/Icon mode status)
    Byte 3: Message Type => 0x00 (Disabled)
                        => 0x01 (Enabled)
            Mode Type    => 0x00 (Normal)
                        => 0x01 (Icon)
    Byte 4: Bit7~Bit0 => Don't Care

Absolute position for STL3888-Ax
================================

::

    Packet 1 (ABSOLUTE POSITION)
    Bit 7 6 5 4 3 2 1 0       7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0
    BYTE  |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
      1   |0|1|V|A|1|L|0|1|  2  |X|X|X|X|X|X|X|X|  3 |Y|Y|Y|Y|Y|Y|Y|Y|  4 |x|x|y|y|X|X|Y|Y|
          |---------------|     |---------------|    |---------------|    |---------------|

    Byte 1: Bit7~Bit6 => 00, Normal data packet
                    => 01, Absolute coordination packet
                    => 10, Notify packet
                    => 11, Normal data packet with on-pad click
            Bit5 => Valid bit, 0 means that the coordinate is invalid or finger up.
                    When both fingers are up, the last two reports have zero valid
                    bit.
            Bit4 => arc
            Bit3 => 1
            Bit2 => Left Button, 1 is pressed, 0 is released.
            Bit1 => 0
            Bit0 => 1
    Byte 2: X coordinate (xpos[9:2])
    Byte 3: Y coordinate (ypos[9:2])
    Byte 4: Bit1~Bit0 => Y coordinate (xpos[1:0])
            Bit3~Bit2 => X coordinate (ypos[1:0])
            Bit5~Bit4 => y1_g
            Bit7~Bit6 => x1_g

    Packet 2 (ABSOLUTE POSITION)
    Bit 7 6 5 4 3 2 1 0       7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0
    BYTE  |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
      1   |0|1|V|A|1|R|1|0|  2  |X|X|X|X|X|X|X|X|  3 |Y|Y|Y|Y|Y|Y|Y|Y|  4 |x|x|y|y|X|X|Y|Y|
          |---------------|     |---------------|    |---------------|    |---------------|

    Byte 1: Bit7~Bit6 => 00, Normal data packet
                    => 01, Absolute coordinates packet
                    => 10, Notify packet
                    => 11, Normal data packet with on-pad click
            Bit5 => Valid bit, 0 means that the coordinate is invalid or finger up.
                    When both fingers are up, the last two reports have zero valid
                    bit.
            Bit4 => arc
            Bit3 => 1
            Bit2 => Right Button, 1 is pressed, 0 is released.
            Bit1 => 1
            Bit0 => 0
    Byte 2: X coordinate (xpos[9:2])
    Byte 3: Y coordinate (ypos[9:2])
    Byte 4: Bit1~Bit0 => Y coordinate (xpos[1:0])
            Bit3~Bit2 => X coordinate (ypos[1:0])
            Bit5~Bit4 => y2_g
            Bit7~Bit6 => x2_g

    Notify Packet for STL3888-Ax
    Bit 7 6 5 4 3 2 1 0       7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0
    BYTE  |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
      1   |1|0|1|P|1|M|R|L|  2  |C|C|C|C|C|C|C|C|  3 |0|0|F|F|0|0|0|i|  4 |r|l|d|u|0|0|0|0|
          |---------------|     |---------------|    |---------------|    |---------------|

    Byte 1: Bit7~Bit6 => 00, Normal data packet
                    => 01, Absolute coordinates packet
                    => 10, Notify packet
                    => 11, Normal data packet with on-pad click
            Bit5 => 1
            Bit4 => when in absolute coordinates mode (valid when EN_PKT_GO is 1):
                    0: left button is generated by the on-pad command
                    1: left button is generated by the external button
            Bit3 => 1
            Bit2 => Middle Button, 1 is pressed, 0 is not pressed.
            Bit1 => Right Button, 1 is pressed, 0 is not pressed.
            Bit0 => Left Button, 1 is pressed, 0 is not pressed.
    Byte 2: Message Type => 0xB7 (Multi Finger, Multi Coordinate mode)
    Byte 3: Bit7~Bit6 => Don't care
            Bit5~Bit4 => Number of fingers
            Bit3~Bit1 => Reserved
            Bit0 => 1: enter gesture mode; 0: leaving gesture mode
    Byte 4: Bit7 => scroll right button
            Bit6 => scroll left button
            Bit5 => scroll down button
            Bit4 => scroll up button
                * Note that if gesture and additional button (Bit4~Bit7)
                happen at the same time, the button information will not
                be sent.
            Bit3~Bit0 => Reserved

Sample sequence of Multi-finger, Multi-coordinate mode:

        notify packet (valid bit == 1), abs pkt 1, abs pkt 2, abs pkt 1,
        abs pkt 2, ..., notify packet (valid bit == 0)

STL3888-B0 손가락 인덱스와 통지

241-337

STL3888-B0의 Packet 1과 Packet 2는 같은 비트 배치를 사용하지만 byte 1 bit 2의 finger index가 각각 0과 1입니다. bit 5는 좌표 valid, bit 4는 finger down 1 또는 finger up 0이며 bits 1·0은 Right와 Left 버튼입니다.

STL3888-B0 절대 패킷
바이트비트의미
17~6`00` normal, `01` absolute, `10` notify, `11` on-pad click normal
15Valid; 0이면 invalid 또는 finger up
14Finger down 1, finger up 0
13항상 1
12Finger index: 0 first, 1 second
11·0Right, Left button
27~0X coordinate `[9:2]`
37~0Y coordinate `[9:2]`
43~0X/Y 하위 좌표 비트
44·5·6·7scroll down, up, left, right

두 패킷에서 공유하는 4바이트 필드입니다.

두 손가락을 모두 떼면 마지막 두 report의 valid bit가 0입니다. B0 notify는 byte 2 `0xB7`, byte 3 bits 5~4의 손가락 수, bit 0의 gesture 진입·이탈을 사용합니다. byte 4의 추가 버튼 순서는 right, left, up, down이며 Ax와 down/up 순서가 다릅니다.

STL3888-B0 notify
필드의미
Byte 1 bit 4Left button 출처: on-pad 또는 external
Byte 2`0xB7` Multi Finger, Multi Coordinate
Byte 3 bits 5~4Number of fingers
Byte 3 bit 0Gesture mode enter/leave
Byte 4 bits 7~4scroll right, left, up, down
동시 gesture추가 버튼 bit 4~7은 전송되지 않음

통지 패킷의 모드와 버튼 필드입니다.

B0 두 손가락 좌표
Valid=1 notify로 다중 좌표 시작Finger index 0 절대 패킷 수신Finger index 1 절대 패킷 수신두 index 패킷을 번갈아 갱신Valid=0 notify로 종료

finger index로 두 패킷을 연결하는 흐름입니다.

Absolute position for STL3888-B0
================================

::

    Packet 1(ABSOLUTE POSITION)
    Bit 7 6 5 4 3 2 1 0       7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0
    BYTE  |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
      1   |0|1|V|F|1|0|R|L|  2  |X|X|X|X|X|X|X|X|  3 |Y|Y|Y|Y|Y|Y|Y|Y|  4 |r|l|u|d|X|X|Y|Y|
          |---------------|     |---------------|    |---------------|    |---------------|

    Byte 1: Bit7~Bit6 => 00, Normal data packet
                    => 01, Absolute coordinates packet
                    => 10, Notify packet
                    => 11, Normal data packet with on-pad click
            Bit5 => Valid bit, 0 means that the coordinate is invalid or finger up.
                    When both fingers are up, the last two reports have zero valid
                    bit.
            Bit4 => finger up/down information. 1: finger down, 0: finger up.
            Bit3 => 1
            Bit2 => finger index, 0 is the first finger, 1 is the second finger.
            Bit1 => Right Button, 1 is pressed, 0 is not pressed.
            Bit0 => Left Button, 1 is pressed, 0 is not pressed.
    Byte 2: X coordinate (xpos[9:2])
    Byte 3: Y coordinate (ypos[9:2])
    Byte 4: Bit1~Bit0 => Y coordinate (xpos[1:0])
            Bit3~Bit2 => X coordinate (ypos[1:0])
            Bit4 => scroll down button
            Bit5 => scroll up button
            Bit6 => scroll left button
            Bit7 => scroll right button

    Packet 2 (ABSOLUTE POSITION)
    Bit 7 6 5 4 3 2 1 0       7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0
    BYTE  |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
      1   |0|1|V|F|1|1|R|L|  2  |X|X|X|X|X|X|X|X|  3 |Y|Y|Y|Y|Y|Y|Y|Y|  4 |r|l|u|d|X|X|Y|Y|
          |---------------|     |---------------|    |---------------|    |---------------|

    Byte 1: Bit7~Bit6 => 00, Normal data packet
                    => 01, Absolute coordination packet
                    => 10, Notify packet
                    => 11, Normal data packet with on-pad click
            Bit5 => Valid bit, 0 means that the coordinate is invalid or finger up.
                    When both fingers are up, the last two reports have zero valid
                    bit.
            Bit4 => finger up/down information. 1: finger down, 0: finger up.
            Bit3 => 1
            Bit2 => finger index, 0 is the first finger, 1 is the second finger.
            Bit1 => Right Button, 1 is pressed, 0 is not pressed.
            Bit0 => Left Button, 1 is pressed, 0 is not pressed.
    Byte 2: X coordinate (xpos[9:2])
    Byte 3: Y coordinate (ypos[9:2])
    Byte 4: Bit1~Bit0 => Y coordinate (xpos[1:0])
            Bit3~Bit2 => X coordinate (ypos[1:0])
            Bit4 => scroll down button
            Bit5 => scroll up button
            Bit6 => scroll left button
            Bit7 => scroll right button

Notify Packet for STL3888-B0::

    Bit 7 6 5 4 3 2 1 0       7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0
    BYTE  |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
      1   |1|0|1|P|1|M|R|L|  2  |C|C|C|C|C|C|C|C|  3 |0|0|F|F|0|0|0|i|  4 |r|l|u|d|0|0|0|0|
          |---------------|     |---------------|    |---------------|    |---------------|

    Byte 1: Bit7~Bit6 => 00, Normal data packet
                    => 01, Absolute coordination packet
                    => 10, Notify packet
                    => 11, Normal data packet with on-pad click
            Bit5 => 1
            Bit4 => when in absolute coordinates mode (valid when EN_PKT_GO is 1):
                    0: left button is generated by the on-pad command
                    1: left button is generated by the external button
            Bit3 => 1
            Bit2 => Middle Button, 1 is pressed, 0 is not pressed.
            Bit1 => Right Button, 1 is pressed, 0 is not pressed.
            Bit0 => Left Button, 1 is pressed, 0 is not pressed.
    Byte 2: Message Type => 0xB7 (Multi Finger, Multi Coordinate mode)
    Byte 3: Bit7~Bit6 => Don't care
            Bit5~Bit4 => Number of fingers
            Bit3~Bit1 => Reserved
            Bit0 => 1: enter gesture mode; 0: leaving gesture mode
    Byte 4: Bit7 => scroll right button
            Bit6 => scroll left button
            Bit5 => scroll up button
            Bit4 => scroll down button
                * Note that if gesture and additional button(Bit4~Bit7)
                happen at the same time, the button information will not
                be sent.
            Bit3~Bit0 => Reserved

Sample sequence of Multi-finger, Multi-coordinate mode:

        notify packet (valid bit == 1), abs pkt 1, abs pkt 2, abs pkt 1,
        abs pkt 2, ..., notify packet (valid bit == 0)

STL3888-Cx·Dx SFAC와 MFMC 패킷

338-444

Cx와 Dx는 single-finger absolute coordinate(SFAC)와 multi-finger multiple coordinates(MFMC)를 byte 1 bit 5로 구분합니다. SFAC에서는 bit 5가 항상 0이고 bit 2는 Middle 버튼입니다. MFMC에서는 bit 5가 항상 1이고 bit 2는 first/second finger index입니다.

Cx·Dx SFAC와 MFMC 비교
필드SFACMFMC
Byte 1 bits 7~6`01` absolute`01` absolute
Byte 1 bit 50, single-finger mode1, multi-finger mode
Byte 1 bit 4Left button sourceLeft button source
Byte 1 bit 2Middle ButtonFinger index 0/1
Byte 1 bits 1~0Right, LeftRight, Left
Byte 2X `[9:2]`X `[9:2]`
Byte 3Y `[9:2]`Y `[9:2]`
Byte 4 bits 3~0X/Y 하위 좌표X/Y 하위 좌표
Byte 4 bits 7~4scroll right/left, Backward/Forward동일

같은 4바이트 골격에서 달라지는 필드입니다.

Byte 1 bit 4가 0이면 LEFT는 on-pad command(OPC), 1이면 external button에서 생성됩니다. 기본값은 LEFT를 누르지 않아도 1입니다. MFMC에서 bit 1과 0이 모두 1이고 bit 4가 0이면 외부 middle 버튼이 눌린 것으로 해석합니다.

한 손가락만 떼면 해당 finger index의 MFMC 패킷을 X=0, Y=0으로 네 번 연속 보냅니다. 첫 손가락은 MFMC#0, 둘째는 MFMC#1입니다. 두 손가락을 모두 떼면 X=0, Y=0인 SFAC 패킷을 네 번 연속 보냅니다.

Cx·Dx finger-up 표시
상황출력
첫 손가락만 upX=0, Y=0인 MFMC#0 네 패킷
둘째 손가락만 upX=0, Y=0인 MFMC#1 네 패킷
두 손가락 모두 upX=0, Y=0인 SFAC 네 패킷

접촉 종료를 좌표 0 패킷 반복으로 알리는 규칙입니다.

Cx·Dx notify message
Byte 2메시지Byte 3Byte 4
`0xBA`Gesture informationGesture IDN/A
`0xC0`One-finger hold-rotating gestureRegion IDFinger up/down

Byte 2 message type에 따른 두 매개변수입니다.

Notify byte 1 bit 5는 항상 0이고 bit 4는 LEFT 출처, bits 2~0은 Middle·Right·Left 버튼입니다. MFMC 모드에서 호스트는 finger index 0과 1의 절대 좌표 패킷을 교차 수신합니다.

Cx·Dx MFMC 시퀀스
Valid=1 notify 수신MFMC packet 1: byte 1 bit 2 = 0MFMC packet 2: byte 1 bit 2 = 1두 패킷을 interleaved 방식으로 반복Valid=0 notify 수신

두 손가락 좌표가 교차하는 정확한 순서입니다.

Absolute position for STL3888-Cx and STL3888-Dx
===============================================

::

    Single Finger, Absolute Coordinate Mode (SFAC)
    Bit 7 6 5 4 3 2 1 0       7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0
    BYTE  |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
      1   |0|1|0|P|1|M|R|L|  2  |X|X|X|X|X|X|X|X|  3 |Y|Y|Y|Y|Y|Y|Y|Y|  4 |r|l|B|F|X|X|Y|Y|
          |---------------|     |---------------|    |---------------|    |---------------|

    Byte 1: Bit7~Bit6 => 00, Normal data packet
                    => 01, Absolute coordinates packet
                    => 10, Notify packet
            Bit5 => Coordinate mode(always 0 in SFAC mode):
                    0: single-finger absolute coordinates (SFAC) mode
                    1: multi-finger, multiple coordinates (MFMC) mode
            Bit4 => 0: The LEFT button is generated by on-pad command (OPC)
                    1: The LEFT button is generated by external button
                    Default is 1 even if the LEFT button is not pressed.
            Bit3 => Always 1, as specified by PS/2 protocol.
            Bit2 => Middle Button, 1 is pressed, 0 is not pressed.
            Bit1 => Right Button, 1 is pressed, 0 is not pressed.
            Bit0 => Left Button, 1 is pressed, 0 is not pressed.
    Byte 2: X coordinate (xpos[9:2])
    Byte 3: Y coordinate (ypos[9:2])
    Byte 4: Bit1~Bit0 => Y coordinate (xpos[1:0])
            Bit3~Bit2 => X coordinate (ypos[1:0])
            Bit4 => 4th mouse button(forward one page)
            Bit5 => 5th mouse button(backward one page)
            Bit6 => scroll left button
            Bit7 => scroll right button

    Multi Finger, Multiple Coordinates Mode (MFMC):
    Bit 7 6 5 4 3 2 1 0       7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0
    BYTE  |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
      1   |0|1|1|P|1|F|R|L|  2  |X|X|X|X|X|X|X|X|  3 |Y|Y|Y|Y|Y|Y|Y|Y|  4 |r|l|B|F|X|X|Y|Y|
          |---------------|     |---------------|    |---------------|    |---------------|

    Byte 1: Bit7~Bit6 => 00, Normal data packet
                    => 01, Absolute coordination packet
                    => 10, Notify packet
            Bit5 => Coordinate mode (always 1 in MFMC mode):
                    0: single-finger absolute coordinates (SFAC) mode
                    1: multi-finger, multiple coordinates (MFMC) mode
            Bit4 => 0: The LEFT button is generated by on-pad command (OPC)
                    1: The LEFT button is generated by external button
                    Default is 1 even if the LEFT button is not pressed.
            Bit3 => Always 1, as specified by PS/2 protocol.
            Bit2 => Finger index, 0 is the first finger, 1 is the second finger.
                    If bit 1 and 0 are all 1 and bit 4 is 0, the middle external
                    button is pressed.
            Bit1 => Right Button, 1 is pressed, 0 is not pressed.
            Bit0 => Left Button, 1 is pressed, 0 is not pressed.
    Byte 2: X coordinate (xpos[9:2])
    Byte 3: Y coordinate (ypos[9:2])
    Byte 4: Bit1~Bit0 => Y coordinate (xpos[1:0])
            Bit3~Bit2 => X coordinate (ypos[1:0])
            Bit4 => 4th mouse button(forward one page)
            Bit5 => 5th mouse button(backward one page)
            Bit6 => scroll left button
            Bit7 => scroll right button

When one of the two fingers is up, the device will output four consecutive
MFMC#0 report packets with zero X and Y to represent 1st finger is up or
four consecutive MFMC#1 report packets with zero X and Y to represent that
the 2nd finger is up.  On the other hand, if both fingers are up, the device
will output four consecutive single-finger, absolute coordinate(SFAC) packets
with zero X and Y.

Notify Packet for STL3888-Cx/Dx::

    Bit 7 6 5 4 3 2 1 0       7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0
    BYTE  |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
      1   |1|0|0|P|1|M|R|L|  2  |C|C|C|C|C|C|C|C|  3 |0|0|F|F|0|0|0|i|  4 |r|l|u|d|0|0|0|0|
          |---------------|     |---------------|    |---------------|    |---------------|

    Byte 1: Bit7~Bit6 => 00, Normal data packet
                    => 01, Absolute coordinates packet
                    => 10, Notify packet
            Bit5 => Always 0
            Bit4 => 0: The LEFT button is generated by on-pad command(OPC)
                    1: The LEFT button is generated by external button
                    Default is 1 even if the LEFT button is not pressed.
            Bit3 => 1
            Bit2 => Middle Button, 1 is pressed, 0 is not pressed.
            Bit1 => Right Button, 1 is pressed, 0 is not pressed.
            Bit0 => Left Button, 1 is pressed, 0 is not pressed.
    Byte 2: Message type:
            0xba => gesture information
            0xc0 => one finger hold-rotating gesture
    Byte 3: The first parameter for the received message:
            0xba => gesture ID (refer to the 'Gesture ID' section)
            0xc0 => region ID
    Byte 4: The second parameter for the received message:
            0xba => N/A
            0xc0 => finger up/down information

Sample sequence of Multi-finger, Multi-coordinates mode:

        notify packet (valid bit == 1), MFMC packet 1 (byte 1, bit 2 == 0),
        MFMC packet 2 (byte 1, bit 2 == 1), MFMC packet 1, MFMC packet 2,
        ..., notify packet (valid bit == 0)

        That is, when the device is in MFMC mode, the host will receive
        interleaved absolute coordinate packets for each finger.

FSP Enable·Disable 통지와 PS/2 명령 집합

445-482

FSP는 PS/2 enable 또는 disable 명령을 받으면 전용 패킷을 보냅니다. 이 패킷은 원래 형식의 byte 1과 byte 2만 패턴으로 사용하므로 나머지 바이트는 무시해야 합니다.

FSP Enable·Disable 패킷
필드값/의미
Byte 1 bits 7~4`0000`: overflow와 sign 모두 0
Byte 1 bit 31
Byte 1 bits 2~0`111`: Middle, Right, Left 모두 1
Byte 2 bits 7~1`0101101b`
Byte 2 bit 01 Enable, 0 Disable
Byte 3Don't care
Byte 4Don't care for mouse ID 3·4
Byte 5~8Don't care for absolute packet

활성 상태를 식별하는 고정 비트 패턴입니다.

FSP는 기본 PS/2 명령 집합과 모드를 지원합니다. 상세 PS/2 명령은 원문 참조 주소 `http://www.computer-engineering.org/ps2mouse/`에 연결되어 있습니다.

Enable 상태 처리
호스트가 PS/2 enable 또는 disable 명령 전송Byte 1이 `00001111b` 패턴인지 확인Byte 2 bits 7~1이 `0101101b`인지 확인Byte 2 bit 0으로 Enable·Disable 판정나머지 바이트는 해석하지 않음

일반 버튼 패킷과 전용 상태 통지를 구분하는 흐름입니다.

FSP Enable/Disable packet
=========================

::

    Bit 7 6 5 4 3 2 1 0       7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0
    BYTE  |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
      1   |Y|X|0|0|1|M|R|L|  2  |0|1|0|1|1|0|1|E|  3 | | | | | | | | |  4 | | | | | | | | |
          |---------------|     |---------------|    |---------------|    |---------------|

    FSP will send out enable/disable packet when FSP receive PS/2 enable/disable
    command. Host will receive the packet which Middle, Right, Left button will
    be set. The packet only use byte 0 and byte 1 as a pattern of original packet.
    Ignore the other bytes of the packet.

    Byte 1: Bit7 => 0, Y overflow
            Bit6 => 0, X overflow
            Bit5 => 0, Y sign bit
            Bit4 => 0, X sign bit
            Bit3 => 1
            Bit2 => 1, Middle Button
            Bit1 => 1, Right Button
            Bit0 => 1, Left Button
    Byte 2: Bit7~1 => (0101101b)
            Bit0 => 1 = Enable
                    0 = Disable
    Byte 3: Don't care
    Byte 4: Don't care (MOUSE ID 3, 4)
    Byte 5~8: Don't care (Absolute packet)

PS/2 Command Set
================

FSP supports basic PS/2 commanding set and modes, refer to following URL for
details about PS/2 commands:

http://www.computer-engineering.org/ps2mouse/

패킷 형식 결정과 레지스터 읽기·쓰기

483-629

패킷 파싱을 결정할 때 먼저 register `0x00`의 device ID와 `0x01`의 version을 읽어 FSP를 식별합니다. STL3888 Cx보다 오래된 버전은 test mode status `0x20`의 bits `0x30`으로 버튼 구성을 판별하고, Cx 이상은 Intellimouse section A 형식을 사용하면서 byte 4 bits 4~7을 무시합니다.

구형 FSP 버튼 구성 판별
버튼 구성파싱
`0x30`2/4 buttonsSection A, byte 4 bits 4~7 무시
`0x20`2/4 buttonsSection A, byte 4 bits 4~7 무시
`0x10`6 buttonsSection B
`0x00`6 buttonsSection A

`reg[0x20] & 0x30` 결과와 파싱 절의 대응입니다.

특수 바이트 변환
변환대상 값
Bitwise inversion `~``0xE8`, `0xE9`, `0xEE`, `0xF2`, `0xF3`, `0xFF`
상·하위 nibble swap10, 20, 40, 60, 80, 100, 200

레지스터 주소나 값으로 보내기 전에 필요한 변환입니다.

레지스터 읽기는 고정 접두 명령 `0xF3, 0x66, 0x88, 0xF3` 뒤 주소의 변환 종류에 따라 분기합니다. 반전 대상이면 `0x68`과 반전 주소, swap 대상이면 `0xCC`와 swap 주소, 일반 주소면 `0x66`과 원본 주소를 보냅니다. 마지막 `0xE9` status request 응답의 네 번째 바이트가 값입니다.

레지스터 읽기 시퀀스
`0xF3` 전송`0x66` 전송`0x88` 전송`0xF3` 전송반전 대상이면 `0x68`, `~address` 전송아니고 swap 대상이면 `0xCC`, swapped address 전송그 밖에는 `0x66`, original address 전송`0xE9` status request 전송응답 네 번째 바이트에서 register value 읽기

주소 변환 분기를 포함한 원문의 9단계를 압축 없이 구조화했습니다.

Cx 이후 하드웨어는 status request 응답의 세 번째 바이트에 register value의 1의 보수 `~val`, 네 번째 바이트에 `val`을 반환합니다. 형식은 ACK `0xFA`, don't-care, `~val`, `val`입니다.

레지스터 쓰기는 먼저 주소를 인코딩하고 다시 값을 인코딩합니다. 주소는 반전이면 `0x74`, swap이면 `0x77`, 일반이면 `0x55`를 사용합니다. 이어 `0xF3` 뒤 값은 반전이면 `0x47`, swap이면 `0x44`, 일반이면 `0x33`을 사용해 전송합니다.

레지스터 쓰기 분기 명령
대상반전Nibble swap원본
Register address`0x74` + `~address``0x77` + swapped address`0x55` + address
Register value`0x47` + `~value``0x44` + swapped value`0x33` + value

주소와 값의 변환 종류별 selector입니다.

레지스터 쓰기 시퀀스
`0xF3` 전송주소 변환 종류에 맞는 selector와 address 전송`0xF3` 전송값 변환 종류에 맞는 selector와 value 전송쓰기 시퀀스 완료Cx 이상이면 선택적으로 `0xE9` 전송응답의 `~val`, `val`로 쓰기 성공 검증

주소와 값을 각각 변환해 보내는 전체 순서입니다.

Programming Sequence for Determining Packet Parsing Flow
========================================================

1. Identify FSP by reading device ID(0x00) and version(0x01) register

2. For FSP version < STL3888 Cx, determine number of buttons by reading
   the 'test mode status' (0x20) register::

        buttons = reg[0x20] & 0x30

        if buttons == 0x30 or buttons == 0x20:
                # two/four buttons
                Refer to 'Finger Sensing Pad PS/2 Mouse Intellimouse'
                section A for packet parsing detail(ignore byte 4, bit ~ 7)
        elif buttons == 0x10:
                # 6 buttons
                Refer to 'Finger Sensing Pad PS/2 Mouse Intellimouse'
                section B for packet parsing detail
        elif buttons == 0x00:
                # 6 buttons
                Refer to 'Finger Sensing Pad PS/2 Mouse Intellimouse'
                section A for packet parsing detail

3. For FSP version >= STL3888 Cx:
        Refer to 'Finger Sensing Pad PS/2 Mouse Intellimouse'
        section A for packet parsing detail (ignore byte 4, bit ~ 7)

Programming Sequence for Register Reading/Writing
=================================================

Register inversion requirement:

Following values needed to be inverted(the '~' operator in C) before being
sent to FSP::

        0xe8, 0xe9, 0xee, 0xf2, 0xf3 and 0xff.

Register swapping requirement:

Following values needed to have their higher 4 bits and lower 4 bits being
swapped before being sent to FSP::

        10, 20, 40, 60, 80, 100 and 200.

Register reading sequence:

        1. send 0xf3 PS/2 command to FSP;

        2. send 0x66 PS/2 command to FSP;

        3. send 0x88 PS/2 command to FSP;

        4. send 0xf3 PS/2 command to FSP;

        5. if the register address being to read is not required to be
        inverted(refer to the 'Register inversion requirement' section),
        goto step 6

          a. send 0x68 PS/2 command to FSP;

          b. send the inverted register address to FSP and goto step 8;

        6. if the register address being to read is not required to be
        swapped(refer to the 'Register swapping requirement' section),
        goto step 7

          a. send 0xcc PS/2 command to FSP;

          b. send the swapped register address to FSP and goto step 8;

        7. send 0x66 PS/2 command to FSP;

          a. send the original register address to FSP and goto step 8;

        8. send 0xe9(status request) PS/2 command to FSP;

        9. the 4th byte of the response read from FSP should be the
        requested register value(?? indicates don't care byte)::

                host: 0xe9
                3888: 0xfa (??) (??) (val)

        * Note that since the Cx release, the hardware will return 1's
          complement of the register value at the 3rd byte of status request
          result::

                host: 0xe9
                3888: 0xfa (??) (~val) (val)

Register writing sequence:

        1. send 0xf3 PS/2 command to FSP;

        2. if the register address being to write is not required to be
        inverted(refer to the 'Register inversion requirement' section),
        goto step 3

          a. send 0x74 PS/2 command to FSP;

          b. send the inverted register address to FSP and goto step 5;

        3. if the register address being to write is not required to be
        swapped(refer to the 'Register swapping requirement' section),
        goto step 4

          a. send 0x77 PS/2 command to FSP;

          b. send the swapped register address to FSP and goto step 5;

        4. send 0x55 PS/2 command to FSP;

          a. send the register address to FSP and goto step 5;

        5. send 0xf3 PS/2 command to FSP;

        6. if the register value being to write is not required to be
        inverted(refer to the 'Register inversion requirement' section),
        goto step 7

          a. send 0x47 PS/2 command to FSP;

          b. send the inverted register value to FSP and goto step 9;

        7. if the register value being to write is not required to be
        swapped(refer to the 'Register swapping requirement' section),
        goto step 8

          a. send 0x44 PS/2 command to FSP;

          b. send the swapped register value to FSP and goto step 9;

        8. send 0x33 PS/2 command to FSP;

          a. send the register value to FSP;

        9. the register writing sequence is completed.

        * Since the Cx release, the hardware will return 1's
          complement of the register value at the 3rd byte of status request
          result. Host can optionally send another 0xe9 (status request) PS/2
          command to FSP at the end of register writing to verify that the
          register writing operation is successful (?? indicates don't care
          byte)::

                host: 0xe9
                3888: 0xfa (??) (~val) (val)

페이지 레지스터 전환과 Gesture ID

630-718

하드웨어는 최대 레지스터 수 제한을 넘기 위해 레지스터를 page 그룹으로 나눕니다. 각 page는 최대 255개 레지스터를 포함합니다. 전원 인가 후 기본 page는 `0x82`이며, 예를 들어 `0x8301`에 접근하려면 먼저 page를 `0x83`으로 바꾸고 offset `0x01`을 앞 절의 일반 읽기·쓰기 절차로 처리합니다.

현재 page 읽기
`0xF3` 전송`0x66` 전송`0x88` 전송`0xF3` 전송`0x83` 전송`0x88` 전송`0xE9` status request 전송응답에서 현재 page value 읽기

Page register reading의 8단계 명령 순서입니다.

Page 쓰기는 접두 `0xF3, 0x38, 0x88, 0xF3` 뒤 page 주소를 변환해 보냅니다. 반전 대상이면 `0x47`과 반전 주소, swap 대상이면 `0x44`와 swap 주소, 일반 주소면 `0x33` 뒤 원본 page 주소를 보냅니다.

현재 page 쓰기
`0xF3`, `0x38`, `0x88`, `0xF3` 순서로 전송반전 대상이면 `0x47`, `~page` 전송아니고 swap 대상이면 `0x44`, swapped page 전송그 밖에는 `0x33`, original page 전송Page register writing 완료

Page address의 변환 분기를 포함한 순서입니다.

일부 장치처럼 여러 손가락 좌표를 호스트에 그대로 보내는 대신, FSP는 내부에서 다중 손가락 좌표를 처리해 8비트 정수 Gesture ID로 변환할 수 있습니다.

FSP Gesture ID
ID설명
`0x86`2 finger straight up
`0x82`2 finger straight down
`0x80`2 finger straight right
`0x84`2 finger straight left
`0x8F`2 finger zoom in
`0x8B`2 finger zoom out
`0xC0`2 finger curve, counter clockwise
`0xC4`2 finger curve, clockwise
`0x2E`3 finger straight up
`0x2A`3 finger straight down
`0x28`3 finger straight right
`0x2C`3 finger straight left
`0x38`Palm

원문에 정의된 두·세 손가락 및 palm 식별자입니다.

Programming Sequence for Page Register Reading/Writing
======================================================

In order to overcome the limitation of maximum number of registers
supported, the hardware separates register into different groups called
'pages.' Each page is able to include up to 255 registers.

The default page after power up is 0x82; therefore, if one has to get
access to register 0x8301, one has to use following sequence to switch
to page 0x83, then start reading/writing from/to offset 0x01 by using
the register read/write sequence described in previous section.

Page register reading sequence:

        1. send 0xf3 PS/2 command to FSP;

        2. send 0x66 PS/2 command to FSP;

        3. send 0x88 PS/2 command to FSP;

        4. send 0xf3 PS/2 command to FSP;

        5. send 0x83 PS/2 command to FSP;

        6. send 0x88 PS/2 command to FSP;

        7. send 0xe9(status request) PS/2 command to FSP;

        8. the response read from FSP should be the requested page value.


Page register writing sequence:

        1. send 0xf3 PS/2 command to FSP;

        2. send 0x38 PS/2 command to FSP;

        3. send 0x88 PS/2 command to FSP;

        4. send 0xf3 PS/2 command to FSP;

        5. if the page address being written is not required to be
        inverted(refer to the 'Register inversion requirement' section),
        goto step 6

          a. send 0x47 PS/2 command to FSP;

          b. send the inverted page address to FSP and goto step 9;

        6. if the page address being written is not required to be
        swapped(refer to the 'Register swapping requirement' section),
        goto step 7

          a. send 0x44 PS/2 command to FSP;

          b. send the swapped page address to FSP and goto step 9;

        7. send 0x33 PS/2 command to FSP;

        8. send the page address to FSP;

        9. the page register writing sequence is completed.

Gesture ID
==========

Unlike other devices which sends multiple fingers' coordinates to host,
FSP processes multiple fingers' coordinates internally and convert them
into a 8 bits integer, namely 'Gesture ID.'  Following is a list of
supported gesture IDs:

        ======= ==================================
        ID        Description
        ======= ==================================
        0x86        2 finger straight up
        0x82        2 finger straight down
        0x80        2 finger straight right
        0x84        2 finger straight left
        0x8f        2 finger zoom in
        0x8b        2 finger zoom out
        0xc0        2 finger curve, counter clockwise
        0xc4        2 finger curve, clockwise
        0x2e        3 finger straight up
        0x2a        3 finger straight down
        0x28        3 finger straight right
        0x2c        3 finger straight left
        0x38        palm
        ======= ==================================

16비트 레지스터 주소와 Cx 이전 제어

719-841

레지스터는 16비트 값으로 표기하며 상위 8비트가 page 주소, 하위 8비트가 그 page 내부 offset입니다. 따라서 `0x8200`은 page `0x82`의 offset `0x00`이고, 다른 page를 쓰려면 앞 절의 page 전환 절차가 필요합니다.

FSP 식별 레지스터
주소기본/접근의미
`0x8200`bits 7~0`0x01` RODevice ID
`0x8201`bits 7~0RWVersion ID
`0x8202`bits 7~0`0x01` ROVendor ID
`0x8203`bits 7~0`0x01` ROProduct ID
`0x8204`bits 3~0`0x01` RWRevision ID

장치·버전·공급사·제품·리비전 식별자입니다.

Version ID 값
세대
`0xC1`STL3888 Ax
`0xD0`~`0xD2`STL3888 Bx
`0xE0`~`0xE1`STL3888 Cx
`0xE2`~`0xE3`STL3888 Dx

`0x8201`에서 읽는 STL3888 세대 코드입니다.

회전·page·clock 제어
주소/비트기본동작
`0x820B` bit 31 ROCx 이전: 0 rotate 180°, 1 no rotation
`0x820F` bit 20 RWCx 이후: 1 rotate 180°, 0 no rotation
`0x820F` bit 00 RWCx 이전: page 1 register file enable
`0x8210` bit 51 RWRegister clock gating: 0 RO, 1 write enable
`0x8210` bits 0·1·41·0·0Reserved, 지정값 유지

세대에 따라 위치가 달라지는 핵심 control bit입니다.

Clock gating bit를 먼저 켜지 않아도 쓸 수 있는 예외 register offset은 `05 06 07 08 09 0c 0f 10 11 12 16 17 18 23 2e 40 41 42 43`입니다. Gesture mode가 켜진 동안에는 `0x8210` bit 5가 반드시 1이어야 합니다.

Cx 이전 버튼 수 `0x8220`
버튼 수/기능
`11`2: left, right
`10`4: left, right, scroll up, scroll down
`01`6: left, right, scroll up/down/left/right
`00`6: left, right, scroll up/down, forward/backward

Test mode status bits 5~4의 버튼 조합입니다.

Cx 이전 on-pad zone
주소/비트기본의미
`0x8231` bit 70On-pad command left-button-down tag enable
`0x8234` bits 4~0`0x05`XLO, 0.5 scanline 단위
`0x8234` bit 70On-pad tap zone enable
`0x8235` bits 4~0`0x1D`XHI, 0.5 scanline 단위
`0x8236` bits 4~0`0x04`YLO, 0.5 scanline 단위
`0x8237` bits 4~0`0x13`YHI, 0.5 scanline 단위

감지 enable과 X/Y 경계 레지스터입니다.

Cx 이전 system control 5 `0x8240`
비트기본기능/우선순위
10FSP Intellimouse mode
20Movement + absolute coordinate; bit 1보다 우선
30Absolute-only coordinate; bits 1·2보다 우선
50Auto switch
60G0 absolute + notify packet format
70PS/2 gesture mode second-finger packet

Intellimouse와 절대 좌표 형식의 우선순위입니다.

Bit 6은 패킷 형식만 선택하며 실제 absolute 또는 relative 출력은 bits 2·3에 달려 있습니다. 둘 중 하나가 1이면 절대 좌표를 받고, 모두 0이면 상대 좌표만 받습니다.

Register Listing
================

Registers are represented in 16 bits values. The higher 8 bits represent
the page address and the lower 8 bits represent the relative offset within
that particular page.  Refer to the 'Programming Sequence for Page Register
Reading/Writing' section for instructions on how to change current page
address::

 offset        width                default        r/w        name
 0x8200        bit7~bit0        0x01        RO        device ID

 0x8201        bit7~bit0                RW        version ID
                                        0xc1: STL3888 Ax
                                        0xd0 ~ 0xd2: STL3888 Bx
                                        0xe0 ~ 0xe1: STL3888 Cx
                                        0xe2 ~ 0xe3: STL3888 Dx

 0x8202        bit7~bit0        0x01        RO        vendor ID

 0x8203        bit7~bit0        0x01        RO        product ID

 0x8204        bit3~bit0        0x01        RW        revision ID

 0x820b                                        test mode status 1
        bit3                1        RO        0: rotate 180 degree
                                        1: no rotation
                                        *only supported by H/W prior to Cx

 0x820f                                        register file page control
        bit2                0        RW        1: rotate 180 degree
                                        0: no rotation
                                        *supported since Cx

        bit0                0        RW        1 to enable page 1 register files
                                        *only supported by H/W prior to Cx

 0x8210                                RW        system control 1
        bit0                1        RW        Reserved, must be 1
        bit1                0        RW        Reserved, must be 0
        bit4                0        RW        Reserved, must be 0
        bit5                1        RW        register clock gating enable
                                        0: read only, 1: read/write enable
        (Note that following registers does not require clock gating being
        enabled prior to write: 05 06 07 08 09 0c 0f 10 11 12 16 17 18 23 2e
        40 41 42 43.  In addition to that, this bit must be 1 when gesture
        mode is enabled)

 0x8220                                        test mode status
        bit5~bit4                RO        number of buttons
                                        11 => 2, lbtn/rbtn
                                        10 => 4, lbtn/rbtn/scru/scrd
                                        01 => 6, lbtn/rbtn/scru/scrd/scrl/scrr
                                        00 => 6, lbtn/rbtn/scru/scrd/fbtn/bbtn
                                        *only supported by H/W prior to Cx

 0x8231                                RW        on-pad command detection
        bit7                0        RW        on-pad command left button down tag
                                        enable
                                        0: disable, 1: enable
                                        *only supported by H/W prior to Cx

 0x8234                                RW        on-pad command control 5
        bit4~bit0        0x05        RW        XLO in 0s/4/1, so 03h = 0010.1b = 2.5
        (Note that position unit is in 0.5 scanline)
                                        *only supported by H/W prior to Cx

        bit7                0        RW        on-pad tap zone enable
                                        0: disable, 1: enable
                                        *only supported by H/W prior to Cx

 0x8235                                RW        on-pad command control 6
        bit4~bit0        0x1d        RW        XHI in 0s/4/1, so 19h = 1100.1b = 12.5
        (Note that position unit is in 0.5 scanline)
                                        *only supported by H/W prior to Cx

 0x8236                                RW        on-pad command control 7
        bit4~bit0        0x04        RW        YLO in 0s/4/1, so 03h = 0010.1b = 2.5
        (Note that position unit is in 0.5 scanline)
                                        *only supported by H/W prior to Cx

 0x8237                                RW        on-pad command control 8
        bit4~bit0        0x13        RW        YHI in 0s/4/1, so 11h = 1000.1b = 8.5
        (Note that position unit is in 0.5 scanline)
                                        *only supported by H/W prior to Cx

 0x8240                                RW        system control 5
        bit1                0        RW        FSP Intellimouse mode enable
                                        0: disable, 1: enable
                                        *only supported by H/W prior to Cx

        bit2                0        RW        movement + abs. coordinate mode enable
                                        0: disable, 1: enable
        (Note that this function has the functionality of bit 1 even when
        bit 1 is not set. However, the format is different from that of bit 1.
        In addition, when bit 1 and bit 2 are set at the same time, bit 2 will
        override bit 1.)
                                        *only supported by H/W prior to Cx

        bit3                0        RW        abs. coordinate only mode enable
                                        0: disable, 1: enable
        (Note that this function has the functionality of bit 1 even when
        bit 1 is not set. However, the format is different from that of bit 1.
        In addition, when bit 1, bit 2 and bit 3 are set at the same time,
        bit 3 will override bit 1 and 2.)
                                        *only supported by H/W prior to Cx

        bit5                0        RW        auto switch enable
                                        0: disable, 1: enable
                                        *only supported by H/W prior to Cx

        bit6                0        RW        G0 abs. + notify packet format enable
                                        0: disable, 1: enable
        (Note that the absolute/relative coordinate output still depends on
        bit 2 and 3.  That is, if any of those bit is 1, host will receive
        absolute coordinates; otherwise, host only receives packets with
        relative coordinate.)
                                        *only supported by H/W prior to Cx

        bit7                0        RW        EN_PS2_F2: PS/2 gesture mode 2nd
                                        finger packet enable
                                        0: disable, 1: enable
                                        *only supported by H/W prior to Cx

On-pad 제어와 Cx 이후 software control

842-901
Cx 이전 on-pad control `0x8243`
비트기본기능
00On-pad control enable
30Fixed vertical scrolling enable
50Fixed horizontal scrolling enable

공통 enable과 고정 스크롤 활성 비트입니다.

`0x8243` bit 0이 0이면 bits 3과 5는 효과가 없습니다. 이 레지스터의 기능은 Cx 이전 하드웨어에만 해당합니다.

Cx 이후 software control `0x8290`
비트기본기능
00Absolute coordinate mode
10Gesture ID output
20Two fingers' coordinates output
30Finger-up one-packet output
40Absolute coordinate continuous mode
6~5`00`Gesture group: basic, suite, suite pro, advanced
70Bx packet output compatible mode

절대 좌표, gesture, 두 손가락 및 호환 패킷 출력을 제어합니다.

Gesture group selection
그룹
`00`Basic
`01`Suite
`10`Suite Pro
`11`Advanced

`0x8290` bits 6~5가 선택하는 기능군입니다.

Page `0x83`의 `0x833D` bit 7은 Cx 이후 on-pad command detection을 활성화하며 기본값은 1입니다. `0x833E` bit 7은 on-pad command의 left-button-down tag를 활성화하지만 hardware-based PS/2 data packet mode에서만 동작합니다.

Cx 이후 page `0x83` on-pad register
주소/비트기본기능
`0x833D` bit 71On-pad command detection enable
`0x833E` bit 70Left-button-down tag enable; H/W PS/2 packet mode only

On-pad 감지와 왼쪽 버튼 tag 제어입니다.

Cx 이후 기능 구성
Version ID로 Cx 또는 Dx 확인`0x8290`에서 absolute·gesture·two-finger 출력 선택필요한 gesture group을 bits 6~5로 지정Page를 `0x83`으로 전환`0x833D` on-pad command detection 설정필요하면 `0x833E` left-button tag 설정Status request의 `~val`, `val`로 쓰기 확인

Page 전환과 software control을 함께 적용하는 흐름입니다.


 0x8243                                RW        on-pad control
        bit0                0        RW        on-pad control enable
                                        0: disable, 1: enable
        (Note that if this bit is cleared, bit 3/5 will be ineffective)
                                        *only supported by H/W prior to Cx

        bit3                0        RW        on-pad fix vertical scrolling enable
                                        0: disable, 1: enable
                                        *only supported by H/W prior to Cx

        bit5                0        RW        on-pad fix horizontal scrolling enable
                                        0: disable, 1: enable
                                        *only supported by H/W prior to Cx

 0x8290                                RW        software control register 1
        bit0                0        RW        absolute coordination mode
                                        0: disable, 1: enable
                                        *supported since Cx

        bit1                0        RW        gesture ID output
                                        0: disable, 1: enable
                                        *supported since Cx

        bit2                0        RW        two fingers' coordinates output
                                        0: disable, 1: enable
                                        *supported since Cx

        bit3                0        RW        finger up one packet output
                                        0: disable, 1: enable
                                        *supported since Cx

        bit4                0        RW        absolute coordination continuous mode
                                        0: disable, 1: enable
                                        *supported since Cx

        bit6~bit5        00        RW        gesture group selection
                                        00: basic
                                        01: suite
                                        10: suite pro
                                        11: advanced
                                        *supported since Cx

        bit7                0        RW        Bx packet output compatible mode
                                        0: disable, 1: enable
                                        *supported since Cx
                                        *supported since Cx


 0x833d                                RW        on-pad command control 1
        bit7                1        RW        on-pad command detection enable
                                        0: disable, 1: enable
                                        *supported since Cx

 0x833e                                RW        on-pad command detection
        bit7                0        RW        on-pad command left button down tag
                                        enable. Works only in H/W based PS/2
                                        data packet mode.
                                        0: disable, 1: enable
                                        *supported since Cx