Lines Matching refs:ipacket

174 	u_char	ipacket[16];	/* interim input buffer */  member
373 .x = (((pb)->ipacket[1] & 0x0f) << 8) | (pb)->ipacket[2], \
374 .y = (((pb)->ipacket[4] & 0x0f) << 8) | (pb)->ipacket[5], \
375 .p = ((pb)->ipacket[1] & 0xf0) | (((pb)->ipacket[4] >> 4) & 0x0f), \
391 #define ELANTECH_PKT_IS_TRACKPOINT(pb) (((pb)->ipacket[3] & 0x0f) == 0x06)
393 (pb)->ipacket[0] == ((hwversion) == 2 ? 0x84 : 0xc4) && \
394 (pb)->ipacket[1] == 0xff && (pb)->ipacket[2] == 0xff && \
395 (pb)->ipacket[3] == 0x02 && (pb)->ipacket[4] == 0xff && \
396 (pb)->ipacket[5] == 0xff)
398 (((pb)->ipacket[0] & 0x0c) == 0x04 && ((pb)->ipacket[3] & 0x0f) == 0x02)
400 ((pb)->ipacket[3] & 0x09) == 0x08 : \
401 ((pb)->ipacket[0] & 0x0c) == 0x04 && ((pb)->ipacket[3] & 0xcf) == 0x02)
403 ((pb)->ipacket[3] & 0x09) == 0x09 : \
404 ((pb)->ipacket[0] & 0x0c) == 0x0c && ((pb)->ipacket[3] & 0xce) == 0x0c)
406 ((pb)->ipacket[3] & 0x08) == 0x00 : \
407 ((pb)->ipacket[0] & 0x0c) == 0x04 && ((pb)->ipacket[3] & 0x1c) == 0x10)
3027 pb->ipacket[pb->inputbytes++] = c;
3030 VLOG(4, (LOG_DEBUG, "psmintr: %02x\n", pb->ipacket[0]));
3040 pb->ipacket[0], pb->ipacket[1], pb->ipacket[2],
3041 pb->ipacket[3], pb->ipacket[4], pb->ipacket[5]));
3044 c = pb->ipacket[0];
3099 bcopy(&pb->ipacket[1], &pb->ipacket[0],
3189 if (((pb->ipacket[0] & MOUSE_PS2PLUS_SYNCMASK) == MOUSE_PS2PLUS_SYNC) &&
3190 (abs(*x) > 191) && MOUSE_PS2PLUS_CHECKBITS(pb->ipacket)) {
3195 switch (MOUSE_PS2PLUS_PACKET_TYPE(pb->ipacket)) {
3199 if (pb->ipacket[2] & 0x80) {
3204 *z = (pb->ipacket[2] & MOUSE_PS2PLUS_ZNEG) ?
3205 (pb->ipacket[2] & 0x0f) - 16 :
3206 (pb->ipacket[2] & 0x0f);
3208 ms->button |= (pb->ipacket[2] &
3211 ms->button |= (pb->ipacket[2] &
3227 if (pb->ipacket[2] & 0x0f)
3228 *z = (pb->ipacket[2] & MOUSE_SPOINT_WNEG) ?
3231 if (pb->ipacket[2] & 0xf0)
3232 *z = (pb->ipacket[2] & MOUSE_SPOINT_ZNEG) ?
3243 MOUSE_PS2PLUS_PACKET_TYPE(pb->ipacket),
3244 pb->ipacket[0], pb->ipacket[1], pb->ipacket[2]));
3314 if ((pb->ipacket[0] & 0xc8) != 0x80 ||
3315 (pb->ipacket[3] & 0xc8) != 0xc0)
3332 *z = pb->ipacket[2];
3347 w = ((pb->ipacket[0] & 0x30) >> 2) |
3348 ((pb->ipacket[0] & 0x04) >> 1) |
3349 ((pb->ipacket[3] & 0x04) >> 2);
3362 *x = ((pb->ipacket[1] & 0x10) ?
3363 pb->ipacket[4] - 256 : pb->ipacket[4]);
3364 *y = ((pb->ipacket[1] & 0x20) ?
3365 pb->ipacket[5] - 256 : pb->ipacket[5]);
3369 if (pb->ipacket[1] & 0x01)
3371 if (pb->ipacket[1] & 0x04)
3373 if (pb->ipacket[1] & 0x02)
3391 ewcode = (pb->ipacket[5] & 0xf0) >> 4;
3398 .x = (((pb->ipacket[4] & 0x0f) << 8) |
3399 pb->ipacket[1]) << 1,
3400 .y = (((pb->ipacket[4] & 0xf0) << 4) |
3401 pb->ipacket[2]) << 1,
3402 .p = ((pb->ipacket[3] & 0x30) |
3403 (pb->ipacket[5] & 0x0f)) << 1,
3409 .x = (((pb->ipacket[4] & 0x0f) << 8) |
3410 (pb->ipacket[1] & 0xfe)) << 1,
3411 .y = (((pb->ipacket[4] & 0xf0) << 4) |
3412 (pb->ipacket[2] & 0xfe)) << 1,
3413 .p = ((pb->ipacket[3] & 0x30) |
3414 (pb->ipacket[5] & 0x0e)) << 1,
3415 .w = (((pb->ipacket[5] & 0x01) << 2) |
3416 ((pb->ipacket[2] & 0x01) << 1) |
3417 (pb->ipacket[1] & 0x01)) + 8,
3422 ew_finger_count = pb->ipacket[1] & 0x0f;
3448 if (pb->ipacket[0] & 0x01)
3450 if (pb->ipacket[0] & 0x02)
3454 if ((pb->ipacket[3] ^ pb->ipacket[0]) & 0x01)
3456 if ((pb->ipacket[3] ^ pb->ipacket[0]) & 0x02)
3461 if ((pb->ipacket[0] ^ pb->ipacket[3]) & 0x01)
3465 if ((pb->ipacket[0] ^ pb->ipacket[3]) & 0x02) {
3467 if (pb->ipacket[4] & 0x01)
3469 if (pb->ipacket[5] & 0x01)
3471 if (pb->ipacket[4] & 0x02)
3473 if (pb->ipacket[5] & 0x02)
3476 if (pb->ipacket[4] & 0x01)
3478 if (pb->ipacket[5] & 0x01)
3480 if (pb->ipacket[4] & 0x02)
3513 pb->ipacket[4] & (1 << i));
3516 pb->ipacket[5] & (1 << i));
3520 pb->ipacket[4] &= ~(mask);
3521 pb->ipacket[5] &= ~(mask);
3534 .x = ((pb->ipacket[3] & 0x10) << 8) |
3535 ((pb->ipacket[1] & 0x0f) << 8) |
3536 (pb->ipacket[4] & 0xfd),
3537 .y = ((pb->ipacket[3] & 0x20) << 7) |
3538 ((pb->ipacket[1] & 0xf0) << 4) |
3539 (pb->ipacket[5] & 0xfd),
3541 .w = (((pb->ipacket[2] & 0x01) << 2) |
3542 (pb->ipacket[5] & 0x02) |
3543 ((pb->ipacket[4] & 0x02) >> 1)) + 8,
3548 .x = ((pb->ipacket[3] & 0x10) << 8) |
3549 ((pb->ipacket[1] & 0x0f) << 8) |
3550 pb->ipacket[4],
3551 .y = ((pb->ipacket[3] & 0x20) << 7) |
3552 ((pb->ipacket[1] & 0xf0) << 4) |
3553 pb->ipacket[5],
3565 clickpad_pressed = (pb->ipacket[0] ^ pb->ipacket[3]) & 0x01;
3684 switch (pb->ipacket[0] & 0xc0) {
3686 bcopy(pb->ipacket, sc->muxsave, 3);
3695 bcopy(pb->ipacket, pb->ipacket + 3, 3);
3696 bcopy(sc->muxsave, pb->ipacket, 3);
3698 pb->ipacket[0] &= ~(0x08 | sc->muxmsbuttons);
3699 pb->ipacket[3] &= ~(0x08 | sc->muxmsbuttons);
3700 butt = (pb->ipacket[3] & 0x03) << 2 | (pb->ipacket[0] & 0x03);
3703 pb->ipacket[0] &= 0xfc;
3704 pb->ipacket[0] |= sc->muxtpbuttons & 0x03;
3705 pb->ipacket[3] &= 0xfc;
3706 pb->ipacket[3] |= sc->muxtpbuttons >> 2 & 0x03;
3714 (pb->ipacket[0] & 0x34) == 0x04 &&
3715 (pb->ipacket[3] & 0x04) == 0x04) {
3716 pb->ipacket[0] &= 0xfb;
3717 pb->ipacket[3] &= 0xfb;
3724 if (sc->muxmsbuttons & 0x03 || pb->ipacket[0] & 0x03 ||
3727 pb->ipacket[0] &= 0xfb;
3728 sc->muxmsbuttons = pb->ipacket[0] & 0x07;
3730 pb->ipacket[4] = pb->ipacket[1];
3731 pb->ipacket[5] = pb->ipacket[2];
3732 pb->ipacket[1] = pb->ipacket[0];
3733 pb->ipacket[2] = 0;
3734 pb->ipacket[0] = 0x84 | (sc->muxtpbuttons & 0x03);
3735 pb->ipacket[3] = 0xc4 | (sc->muxtpbuttons >> 2 & 0x03);
3739 pb->ipacket[0], pb->ipacket[1], pb->ipacket[2],
3740 pb->ipacket[3], pb->ipacket[4], pb->ipacket[5]));
4407 pkt = (pb->ipacket[0] & 0xc0) == 0x80 ?
4421 switch (pb->ipacket[3] & 0x03) {
4476 nfingers = (pb->ipacket[0] & 0xc0) >> 6;
4477 if (nfingers == 3 && (pb->ipacket[3] & 0x80))
4489 f[0].w = ((pb->ipacket[0] & 0x30) >> 2) |
4490 ((pb->ipacket[3] & 0x30) >> 4);
4525 .x = (((pb->ipacket[id * 3] & 0x10) << 4) |
4526 pb->ipacket[id * 3 + 1]) << 2,
4527 .y = (((pb->ipacket[id * 3] & 0x20) << 3) |
4528 pb->ipacket[id * 3 + 2]) << 2,
4547 nfingers = (pb->ipacket[0] & 0xc0) >> 6;
4556 fn.w = ((pb->ipacket[0] & 0x30) >> 2) |
4557 ((pb->ipacket[3] & 0x30) >> 4);
4592 mask = pb->ipacket[1] & 0x1f;
4627 id = ((pb->ipacket[3] & 0xe0) >> 5) - 1;
4629 fn.w =(pb->ipacket[0] & 0xf0) >> 4;
4678 scale = (pb->ipacket[0] & 0x10) ? 5 : 1;
4680 id = ((pb->ipacket[i] & 0xe0) >> 5) - 1;
4687 (signed char)pb->ipacket[i+1] * scale);
4689 (signed char)pb->ipacket[i+2] * scale);
4712 if (!(pb->ipacket[0] & 0xC8) && !(pb->ipacket[1] & 0x7F) &&
4713 !(pb->ipacket[2] & 0x7F) && !(pb->ipacket[3] & 0xC9) &&
4714 !(pb->ipacket[0] & 0x10) != !(pb->ipacket[1] & 0x80) &&
4715 !(pb->ipacket[0] & 0x10) != !(pb->ipacket[3] & 0x10) &&
4716 !(pb->ipacket[0] & 0x20) != !(pb->ipacket[2] & 0x80) &&
4717 !(pb->ipacket[0] & 0x20) != !(pb->ipacket[3] & 0x20)) {
4718 *x = (pb->ipacket[0] & MOUSE_PS2_XNEG) ?
4719 pb->ipacket[4] - 256 : pb->ipacket[4];
4720 *y = (pb->ipacket[0] & MOUSE_PS2_YNEG) ?
4721 pb->ipacket[5] - 256 : pb->ipacket[5];
4724 ((pb->ipacket[0] & 0x01) ? MOUSE_BUTTON1DOWN : 0) |
4725 ((pb->ipacket[0] & 0x02) ? MOUSE_BUTTON3DOWN : 0) |
4726 ((pb->ipacket[0] & 0x04) ? MOUSE_BUTTON2DOWN : 0);
4755 ((pb->ipacket[0] & 0x03) ? MOUSE_BUTTON1DOWN : 0);
4758 ((pb->ipacket[0] & 0x01) ? MOUSE_BUTTON1DOWN : 0) |
4759 ((pb->ipacket[0] & 0x02) ? MOUSE_BUTTON3DOWN : 0);
4868 c = pb->ipacket[0];
4873 x0 = pb->ipacket[1] | (((pb->ipacket[4]) & 0x0f) << 8);
4874 y0 = pb->ipacket[2] | (((pb->ipacket[4]) & 0xf0) << 4);
4916 pb->ipacket[0], pb->ipacket[1], pb->ipacket[2],
4917 pb->ipacket[3], pb->ipacket[4], pb->ipacket[5]));
4955 c = pb->ipacket[0];
4962 pb->ipacket[1] |= (c & MOUSE_PS2_XOVERFLOW) ? 0x80 : 0;
4966 pb->ipacket[1] - 256 : pb->ipacket[1];
4968 pb->ipacket[2] - 256 : pb->ipacket[2];
4992 z = (pb->ipacket[3] & MOUSE_EXPLORER_ZNEG) ?
4993 (pb->ipacket[3] & 0x0f) - 16 :
4994 (pb->ipacket[3] & 0x0f);
4996 (pb->ipacket[3] & MOUSE_EXPLORER_BUTTON4DOWN) ?
4999 (pb->ipacket[3] & MOUSE_EXPLORER_BUTTON5DOWN) ?
5006 z = (char)pb->ipacket[3];
5033 ms.button |= (pb->ipacket[3] & MOUSE_PS2_BUTTON3DOWN) ?
5035 ms.button |= (pb->ipacket[3] & MOUSE_PS2_BUTTON1DOWN) ?
5037 z = (pb->ipacket[3] & MOUSE_PS2_XNEG) ?
5038 pb->ipacket[4] - 256 : pb->ipacket[4];
5065 x = (pb->ipacket[1] & 0x80) ?
5066 pb->ipacket[1] - 256 : pb->ipacket[1];
5067 y = (pb->ipacket[2] & 0x80) ?
5068 pb->ipacket[2] - 256 : pb->ipacket[2];
5099 if (pb->ipacket[2] & MOUSE_4DPLUS_BUTTON4DOWN)
5101 z = (pb->ipacket[2] & MOUSE_4DPLUS_ZNEG) ?
5102 ((pb->ipacket[2] & 0x07) - 8) :
5103 (pb->ipacket[2] & 0x07) ;
5199 pb->inputbytes = tame_mouse(sc, pb, &ms, pb->ipacket);
5215 bcopy(&pb->ipacket[0], &sc->queue.buf[sc->queue.tail], l);
5217 bcopy(&pb->ipacket[l], &sc->queue.buf[0],