Lines Matching refs:ipacket

176 	u_char	ipacket[16];	/* interim input buffer */  member
375 .x = (((pb)->ipacket[1] & 0x0f) << 8) | (pb)->ipacket[2], \
376 .y = (((pb)->ipacket[4] & 0x0f) << 8) | (pb)->ipacket[5], \
377 .p = ((pb)->ipacket[1] & 0xf0) | (((pb)->ipacket[4] >> 4) & 0x0f), \
393 #define ELANTECH_PKT_IS_TRACKPOINT(pb) (((pb)->ipacket[3] & 0x0f) == 0x06)
395 (pb)->ipacket[0] == ((hwversion) == 2 ? 0x84 : 0xc4) && \
396 (pb)->ipacket[1] == 0xff && (pb)->ipacket[2] == 0xff && \
397 (pb)->ipacket[3] == 0x02 && (pb)->ipacket[4] == 0xff && \
398 (pb)->ipacket[5] == 0xff)
400 (((pb)->ipacket[0] & 0x0c) == 0x04 && ((pb)->ipacket[3] & 0x0f) == 0x02)
402 ((pb)->ipacket[3] & 0x09) == 0x08 : \
403 ((pb)->ipacket[0] & 0x0c) == 0x04 && ((pb)->ipacket[3] & 0xcf) == 0x02)
405 ((pb)->ipacket[3] & 0x09) == 0x09 : \
406 ((pb)->ipacket[0] & 0x0c) == 0x0c && ((pb)->ipacket[3] & 0xce) == 0x0c)
408 ((pb)->ipacket[3] & 0x08) == 0x00 : \
409 ((pb)->ipacket[0] & 0x0c) == 0x04 && ((pb)->ipacket[3] & 0x1c) == 0x10)
3010 pb->ipacket[pb->inputbytes++] = c;
3013 VLOG(4, (LOG_DEBUG, "psmintr: %02x\n", pb->ipacket[0]));
3023 pb->ipacket[0], pb->ipacket[1], pb->ipacket[2],
3024 pb->ipacket[3], pb->ipacket[4], pb->ipacket[5]));
3027 c = pb->ipacket[0];
3082 bcopy(&pb->ipacket[1], &pb->ipacket[0],
3172 if (((pb->ipacket[0] & MOUSE_PS2PLUS_SYNCMASK) == MOUSE_PS2PLUS_SYNC) &&
3173 (abs(*x) > 191) && MOUSE_PS2PLUS_CHECKBITS(pb->ipacket)) {
3178 switch (MOUSE_PS2PLUS_PACKET_TYPE(pb->ipacket)) {
3182 if (pb->ipacket[2] & 0x80) {
3187 *z = (pb->ipacket[2] & MOUSE_PS2PLUS_ZNEG) ?
3188 (pb->ipacket[2] & 0x0f) - 16 :
3189 (pb->ipacket[2] & 0x0f);
3191 ms->button |= (pb->ipacket[2] &
3194 ms->button |= (pb->ipacket[2] &
3210 if (pb->ipacket[2] & 0x0f)
3211 *z = (pb->ipacket[2] & MOUSE_SPOINT_WNEG) ?
3214 if (pb->ipacket[2] & 0xf0)
3215 *z = (pb->ipacket[2] & MOUSE_SPOINT_ZNEG) ?
3226 MOUSE_PS2PLUS_PACKET_TYPE(pb->ipacket),
3227 pb->ipacket[0], pb->ipacket[1], pb->ipacket[2]));
3297 if ((pb->ipacket[0] & 0xc8) != 0x80 ||
3298 (pb->ipacket[3] & 0xc8) != 0xc0)
3315 *z = pb->ipacket[2];
3330 w = ((pb->ipacket[0] & 0x30) >> 2) |
3331 ((pb->ipacket[0] & 0x04) >> 1) |
3332 ((pb->ipacket[3] & 0x04) >> 2);
3345 *x = ((pb->ipacket[1] & 0x10) ?
3346 pb->ipacket[4] - 256 : pb->ipacket[4]);
3347 *y = ((pb->ipacket[1] & 0x20) ?
3348 pb->ipacket[5] - 256 : pb->ipacket[5]);
3352 if (pb->ipacket[1] & 0x01)
3354 if (pb->ipacket[1] & 0x04)
3356 if (pb->ipacket[1] & 0x02)
3374 ewcode = (pb->ipacket[5] & 0xf0) >> 4;
3381 .x = (((pb->ipacket[4] & 0x0f) << 8) |
3382 pb->ipacket[1]) << 1,
3383 .y = (((pb->ipacket[4] & 0xf0) << 4) |
3384 pb->ipacket[2]) << 1,
3385 .p = ((pb->ipacket[3] & 0x30) |
3386 (pb->ipacket[5] & 0x0f)) << 1,
3392 .x = (((pb->ipacket[4] & 0x0f) << 8) |
3393 (pb->ipacket[1] & 0xfe)) << 1,
3394 .y = (((pb->ipacket[4] & 0xf0) << 4) |
3395 (pb->ipacket[2] & 0xfe)) << 1,
3396 .p = ((pb->ipacket[3] & 0x30) |
3397 (pb->ipacket[5] & 0x0e)) << 1,
3398 .w = (((pb->ipacket[5] & 0x01) << 2) |
3399 ((pb->ipacket[2] & 0x01) << 1) |
3400 (pb->ipacket[1] & 0x01)) + 8,
3405 ew_finger_count = pb->ipacket[1] & 0x0f;
3431 if (pb->ipacket[0] & 0x01)
3433 if (pb->ipacket[0] & 0x02)
3437 if ((pb->ipacket[3] ^ pb->ipacket[0]) & 0x01)
3439 if ((pb->ipacket[3] ^ pb->ipacket[0]) & 0x02)
3444 if ((pb->ipacket[0] ^ pb->ipacket[3]) & 0x01)
3448 if ((pb->ipacket[0] ^ pb->ipacket[3]) & 0x02) {
3450 if (pb->ipacket[4] & 0x01)
3452 if (pb->ipacket[5] & 0x01)
3454 if (pb->ipacket[4] & 0x02)
3456 if (pb->ipacket[5] & 0x02)
3459 if (pb->ipacket[4] & 0x01)
3461 if (pb->ipacket[5] & 0x01)
3463 if (pb->ipacket[4] & 0x02)
3496 pb->ipacket[4] & (1 << i));
3499 pb->ipacket[5] & (1 << i));
3503 pb->ipacket[4] &= ~(mask);
3504 pb->ipacket[5] &= ~(mask);
3517 .x = ((pb->ipacket[3] & 0x10) << 8) |
3518 ((pb->ipacket[1] & 0x0f) << 8) |
3519 (pb->ipacket[4] & 0xfd),
3520 .y = ((pb->ipacket[3] & 0x20) << 7) |
3521 ((pb->ipacket[1] & 0xf0) << 4) |
3522 (pb->ipacket[5] & 0xfd),
3524 .w = (((pb->ipacket[2] & 0x01) << 2) |
3525 (pb->ipacket[5] & 0x02) |
3526 ((pb->ipacket[4] & 0x02) >> 1)) + 8,
3531 .x = ((pb->ipacket[3] & 0x10) << 8) |
3532 ((pb->ipacket[1] & 0x0f) << 8) |
3533 pb->ipacket[4],
3534 .y = ((pb->ipacket[3] & 0x20) << 7) |
3535 ((pb->ipacket[1] & 0xf0) << 4) |
3536 pb->ipacket[5],
3548 clickpad_pressed = (pb->ipacket[0] ^ pb->ipacket[3]) & 0x01;
3667 switch (pb->ipacket[0] & 0xc0) {
3669 bcopy(pb->ipacket, sc->muxsave, 3);
3678 bcopy(pb->ipacket, pb->ipacket + 3, 3);
3679 bcopy(sc->muxsave, pb->ipacket, 3);
3681 pb->ipacket[0] &= ~(0x08 | sc->muxmsbuttons);
3682 pb->ipacket[3] &= ~(0x08 | sc->muxmsbuttons);
3683 butt = (pb->ipacket[3] & 0x03) << 2 | (pb->ipacket[0] & 0x03);
3686 pb->ipacket[0] &= 0xfc;
3687 pb->ipacket[0] |= sc->muxtpbuttons & 0x03;
3688 pb->ipacket[3] &= 0xfc;
3689 pb->ipacket[3] |= sc->muxtpbuttons >> 2 & 0x03;
3697 (pb->ipacket[0] & 0x34) == 0x04 &&
3698 (pb->ipacket[3] & 0x04) == 0x04) {
3699 pb->ipacket[0] &= 0xfb;
3700 pb->ipacket[3] &= 0xfb;
3707 if (sc->muxmsbuttons & 0x03 || pb->ipacket[0] & 0x03 ||
3710 pb->ipacket[0] &= 0xfb;
3711 sc->muxmsbuttons = pb->ipacket[0] & 0x07;
3713 pb->ipacket[4] = pb->ipacket[1];
3714 pb->ipacket[5] = pb->ipacket[2];
3715 pb->ipacket[1] = pb->ipacket[0];
3716 pb->ipacket[2] = 0;
3717 pb->ipacket[0] = 0x84 | (sc->muxtpbuttons & 0x03);
3718 pb->ipacket[3] = 0xc4 | (sc->muxtpbuttons >> 2 & 0x03);
3722 pb->ipacket[0], pb->ipacket[1], pb->ipacket[2],
3723 pb->ipacket[3], pb->ipacket[4], pb->ipacket[5]));
4383 pkt = (pb->ipacket[0] & 0xc0) == 0x80 ?
4397 switch (pb->ipacket[3] & 0x03) {
4452 nfingers = (pb->ipacket[0] & 0xc0) >> 6;
4453 if (nfingers == 3 && (pb->ipacket[3] & 0x80))
4465 f[0].w = ((pb->ipacket[0] & 0x30) >> 2) |
4466 ((pb->ipacket[3] & 0x30) >> 4);
4501 .x = (((pb->ipacket[id * 3] & 0x10) << 4) |
4502 pb->ipacket[id * 3 + 1]) << 2,
4503 .y = (((pb->ipacket[id * 3] & 0x20) << 3) |
4504 pb->ipacket[id * 3 + 2]) << 2,
4523 nfingers = (pb->ipacket[0] & 0xc0) >> 6;
4532 fn.w = ((pb->ipacket[0] & 0x30) >> 2) |
4533 ((pb->ipacket[3] & 0x30) >> 4);
4568 mask = pb->ipacket[1] & 0x1f;
4603 id = ((pb->ipacket[3] & 0xe0) >> 5) - 1;
4605 fn.w =(pb->ipacket[0] & 0xf0) >> 4;
4654 scale = (pb->ipacket[0] & 0x10) ? 5 : 1;
4656 id = ((pb->ipacket[i] & 0xe0) >> 5) - 1;
4663 (signed char)pb->ipacket[i+1] * scale);
4665 (signed char)pb->ipacket[i+2] * scale);
4688 if (!(pb->ipacket[0] & 0xC8) && !(pb->ipacket[1] & 0x7F) &&
4689 !(pb->ipacket[2] & 0x7F) && !(pb->ipacket[3] & 0xC9) &&
4690 !(pb->ipacket[0] & 0x10) != !(pb->ipacket[1] & 0x80) &&
4691 !(pb->ipacket[0] & 0x10) != !(pb->ipacket[3] & 0x10) &&
4692 !(pb->ipacket[0] & 0x20) != !(pb->ipacket[2] & 0x80) &&
4693 !(pb->ipacket[0] & 0x20) != !(pb->ipacket[3] & 0x20)) {
4694 *x = (pb->ipacket[0] & MOUSE_PS2_XNEG) ?
4695 pb->ipacket[4] - 256 : pb->ipacket[4];
4696 *y = (pb->ipacket[0] & MOUSE_PS2_YNEG) ?
4697 pb->ipacket[5] - 256 : pb->ipacket[5];
4700 ((pb->ipacket[0] & 0x01) ? MOUSE_BUTTON1DOWN : 0) |
4701 ((pb->ipacket[0] & 0x02) ? MOUSE_BUTTON3DOWN : 0) |
4702 ((pb->ipacket[0] & 0x04) ? MOUSE_BUTTON2DOWN : 0);
4731 ((pb->ipacket[0] & 0x03) ? MOUSE_BUTTON1DOWN : 0);
4734 ((pb->ipacket[0] & 0x01) ? MOUSE_BUTTON1DOWN : 0) |
4735 ((pb->ipacket[0] & 0x02) ? MOUSE_BUTTON3DOWN : 0);
4844 c = pb->ipacket[0];
4849 x0 = pb->ipacket[1] | (((pb->ipacket[4]) & 0x0f) << 8);
4850 y0 = pb->ipacket[2] | (((pb->ipacket[4]) & 0xf0) << 4);
4892 pb->ipacket[0], pb->ipacket[1], pb->ipacket[2],
4893 pb->ipacket[3], pb->ipacket[4], pb->ipacket[5]));
4931 c = pb->ipacket[0];
4938 pb->ipacket[1] |= (c & MOUSE_PS2_XOVERFLOW) ? 0x80 : 0;
4942 pb->ipacket[1] - 256 : pb->ipacket[1];
4944 pb->ipacket[2] - 256 : pb->ipacket[2];
4968 z = (pb->ipacket[3] & MOUSE_EXPLORER_ZNEG) ?
4969 (pb->ipacket[3] & 0x0f) - 16 :
4970 (pb->ipacket[3] & 0x0f);
4972 (pb->ipacket[3] & MOUSE_EXPLORER_BUTTON4DOWN) ?
4975 (pb->ipacket[3] & MOUSE_EXPLORER_BUTTON5DOWN) ?
4982 z = (char)pb->ipacket[3];
5009 ms.button |= (pb->ipacket[3] & MOUSE_PS2_BUTTON3DOWN) ?
5011 ms.button |= (pb->ipacket[3] & MOUSE_PS2_BUTTON1DOWN) ?
5013 z = (pb->ipacket[3] & MOUSE_PS2_XNEG) ?
5014 pb->ipacket[4] - 256 : pb->ipacket[4];
5041 x = (pb->ipacket[1] & 0x80) ?
5042 pb->ipacket[1] - 256 : pb->ipacket[1];
5043 y = (pb->ipacket[2] & 0x80) ?
5044 pb->ipacket[2] - 256 : pb->ipacket[2];
5075 if (pb->ipacket[2] & MOUSE_4DPLUS_BUTTON4DOWN)
5077 z = (pb->ipacket[2] & MOUSE_4DPLUS_ZNEG) ?
5078 ((pb->ipacket[2] & 0x07) - 8) :
5079 (pb->ipacket[2] & 0x07) ;
5179 pb->inputbytes = tame_mouse(sc, pb, &ms, pb->ipacket);
5195 bcopy(&pb->ipacket[0], &sc->queue.buf[sc->queue.tail], l);
5197 bcopy(&pb->ipacket[l], &sc->queue.buf[0],