Lines Matching refs:packet
71 * following absolute position packet for the finger where the
150 unsigned char *packet)
154 unsigned char fingers = packet[1];
157 state->pressed = (packet[0] >> 4) & 1;
174 unsigned char *packet)
180 finger = (packet[1] >> 4) - 1;
182 psmouse_err(psmouse, "Invalid finger in abs packet: %d\n",
187 state->pressed = (packet[0] >> 4) & 1;
189 state->fingers[finger].x = ((packet[1] & 0xf) << 8) | packet[2];
190 state->fingers[finger].y = (packet[3] << 8) | packet[4];
191 state->width = packet[5] >> 4;
196 unsigned char *packet)
202 state->pressed = packet[0] >> 7;
203 finger1 = ((packet[0] >> 4) & 0x7) - 1;
205 state->fingers[finger1].x += (s8)packet[1];
206 state->fingers[finger1].y += (s8)packet[2];
208 psmouse_err(psmouse, "First finger in rel packet invalid: %d\n",
214 * packet only contains one finger. In this case, the second
215 * finger index in the packet is 0 (we subtract 1 in the lines
219 finger2 = ((packet[3] >> 4) & 0x7) - 1;
221 state->fingers[finger2].x += (s8)packet[4];
222 state->fingers[finger2].y += (s8)packet[5];
228 unsigned char *packet = psmouse->packet;
230 switch (packet[0] & 0xf) {
232 focaltech_process_touch_packet(psmouse, packet);
236 focaltech_process_abs_packet(psmouse, packet);
240 focaltech_process_rel_packet(psmouse, packet);
244 psmouse_err(psmouse, "Unknown packet type: %02x\n", packet[0]);
253 if (psmouse->pktcnt >= 6) { /* Full packet received */