Lines Matching defs:packet
71 uint8 packet[PS2_PACKET_ELANTECH];
83 if (packet_buffer_read(cookie->ring_buffer, packet,
89 if (cookie->crcEnabled && (packet[3] & 0x08) != 0) {
92 } else if (!cookie->crcEnabled && ((packet[0] & 0x0c) != 0x04
93 || (packet[3] & 0x1c) != 0x10)) {
98 uint8 packet_type = packet[3] & 3;
99 TRACE("ELANTECH: packet type %d\n", packet_type);
100 TRACE("ELANTECH: packet content 0x%02x%02x%02x%02x%02x%02x\n",
101 packet[0], packet[1], packet[2], packet[3],
102 packet[4], packet[5]);
106 cookie->fingers = (packet[4] & 0x80) == 0 ? packet[1] & 0x1f: 0;
108 cookie->fingers, packet[1]);
111 dprintf("ELANTECH: Fingers %d, raw %x (HEAD)\n", (packet[3] & 0xe0) >>5, packet[3]);
113 if ((packet[3] & 0xe0) != 0x20)
116 event.zPressure = (packet[1] & 0xf0) | ((packet[4] & 0xf0) >> 4);
120 cookie->x = event.xPosition = ((packet[1] & 0xf) << 8) | packet[2];
121 cookie->y = event.yPosition = ((packet[4] & 0xf) << 8) | packet[5];
129 dprintf("ELANTECH: Fingers %d, raw %x (MOTION)\n", (packet[3] & 0xe0) >>5, packet[3]); //Most likely palm
132 if ((packet[0] & 0x10) != 0) {
133 event.xPosition = cookie->x += 5 * (int8)packet[1];
134 event.yPosition = cookie->y += 5 * (int8)packet[2];
136 event.xPosition = cookie->x += (int8)packet[1];
137 event.yPosition = cookie->y += (int8)packet[2];
144 dprintf("ELANTECH: unknown packet type %d\n", packet_type);