Lines Matching refs:ipacket
173 u_char ipacket[16]; /* interim input buffer */ member
372 .x = (((pb)->ipacket[1] & 0x0f) << 8) | (pb)->ipacket[2], \
373 .y = (((pb)->ipacket[4] & 0x0f) << 8) | (pb)->ipacket[5], \
374 .p = ((pb)->ipacket[1] & 0xf0) | (((pb)->ipacket[4] >> 4) & 0x0f), \
390 #define ELANTECH_PKT_IS_TRACKPOINT(pb) (((pb)->ipacket[3] & 0x0f) == 0x06)
392 (pb)->ipacket[0] == ((hwversion) == 2 ? 0x84 : 0xc4) && \
393 (pb)->ipacket[1] == 0xff && (pb)->ipacket[2] == 0xff && \
394 (pb)->ipacket[3] == 0x02 && (pb)->ipacket[4] == 0xff && \
395 (pb)->ipacket[5] == 0xff)
397 (((pb)->ipacket[0] & 0x0c) == 0x04 && ((pb)->ipacket[3] & 0x0f) == 0x02)
399 ((pb)->ipacket[3] & 0x09) == 0x08 : \
400 ((pb)->ipacket[0] & 0x0c) == 0x04 && ((pb)->ipacket[3] & 0xcf) == 0x02)
402 ((pb)->ipacket[3] & 0x09) == 0x09 : \
403 ((pb)->ipacket[0] & 0x0c) == 0x0c && ((pb)->ipacket[3] & 0xce) == 0x0c)
405 ((pb)->ipacket[3] & 0x08) == 0x00 : \
406 ((pb)->ipacket[0] & 0x0c) == 0x04 && ((pb)->ipacket[3] & 0x1c) == 0x10)
3008 pb->ipacket[pb->inputbytes++] = c;
3011 VLOG(4, (LOG_DEBUG, "psmintr: %02x\n", pb->ipacket[0]));
3021 pb->ipacket[0], pb->ipacket[1], pb->ipacket[2],
3022 pb->ipacket[3], pb->ipacket[4], pb->ipacket[5]));
3025 c = pb->ipacket[0];
3080 bcopy(&pb->ipacket[1], &pb->ipacket[0],
3166 if (((pb->ipacket[0] & MOUSE_PS2PLUS_SYNCMASK) == MOUSE_PS2PLUS_SYNC) &&
3167 (abs(*x) > 191) && MOUSE_PS2PLUS_CHECKBITS(pb->ipacket)) {
3172 switch (MOUSE_PS2PLUS_PACKET_TYPE(pb->ipacket)) {
3176 if (pb->ipacket[2] & 0x80) {
3181 *z = (pb->ipacket[2] & MOUSE_PS2PLUS_ZNEG) ?
3182 (pb->ipacket[2] & 0x0f) - 16 :
3183 (pb->ipacket[2] & 0x0f);
3185 ms->button |= (pb->ipacket[2] &
3188 ms->button |= (pb->ipacket[2] &
3204 if (pb->ipacket[2] & 0x0f)
3205 *z = (pb->ipacket[2] & MOUSE_SPOINT_WNEG) ?
3208 if (pb->ipacket[2] & 0xf0)
3209 *z = (pb->ipacket[2] & MOUSE_SPOINT_ZNEG) ?
3220 MOUSE_PS2PLUS_PACKET_TYPE(pb->ipacket),
3221 pb->ipacket[0], pb->ipacket[1], pb->ipacket[2]));
3291 if ((pb->ipacket[0] & 0xc8) != 0x80 ||
3292 (pb->ipacket[3] & 0xc8) != 0xc0)
3309 *z = pb->ipacket[2];
3324 w = ((pb->ipacket[0] & 0x30) >> 2) |
3325 ((pb->ipacket[0] & 0x04) >> 1) |
3326 ((pb->ipacket[3] & 0x04) >> 2);
3339 *x = ((pb->ipacket[1] & 0x10) ?
3340 pb->ipacket[4] - 256 : pb->ipacket[4]);
3341 *y = ((pb->ipacket[1] & 0x20) ?
3342 pb->ipacket[5] - 256 : pb->ipacket[5]);
3346 if (pb->ipacket[1] & 0x01)
3348 if (pb->ipacket[1] & 0x04)
3350 if (pb->ipacket[1] & 0x02)
3368 ewcode = (pb->ipacket[5] & 0xf0) >> 4;
3375 .x = (((pb->ipacket[4] & 0x0f) << 8) |
3376 pb->ipacket[1]) << 1,
3377 .y = (((pb->ipacket[4] & 0xf0) << 4) |
3378 pb->ipacket[2]) << 1,
3379 .p = ((pb->ipacket[3] & 0x30) |
3380 (pb->ipacket[5] & 0x0f)) << 1,
3386 .x = (((pb->ipacket[4] & 0x0f) << 8) |
3387 (pb->ipacket[1] & 0xfe)) << 1,
3388 .y = (((pb->ipacket[4] & 0xf0) << 4) |
3389 (pb->ipacket[2] & 0xfe)) << 1,
3390 .p = ((pb->ipacket[3] & 0x30) |
3391 (pb->ipacket[5] & 0x0e)) << 1,
3392 .w = (((pb->ipacket[5] & 0x01) << 2) |
3393 ((pb->ipacket[2] & 0x01) << 1) |
3394 (pb->ipacket[1] & 0x01)) + 8,
3399 ew_finger_count = pb->ipacket[1] & 0x0f;
3425 if (pb->ipacket[0] & 0x01)
3427 if (pb->ipacket[0] & 0x02)
3431 if ((pb->ipacket[3] ^ pb->ipacket[0]) & 0x01)
3433 if ((pb->ipacket[3] ^ pb->ipacket[0]) & 0x02)
3438 if ((pb->ipacket[0] ^ pb->ipacket[3]) & 0x01)
3442 if ((pb->ipacket[0] ^ pb->ipacket[3]) & 0x02) {
3444 if (pb->ipacket[4] & 0x01)
3446 if (pb->ipacket[5] & 0x01)
3448 if (pb->ipacket[4] & 0x02)
3450 if (pb->ipacket[5] & 0x02)
3453 if (pb->ipacket[4] & 0x01)
3455 if (pb->ipacket[5] & 0x01)
3457 if (pb->ipacket[4] & 0x02)
3490 pb->ipacket[4] & (1 << i));
3493 pb->ipacket[5] & (1 << i));
3497 pb->ipacket[4] &= ~(mask);
3498 pb->ipacket[5] &= ~(mask);
3511 .x = ((pb->ipacket[3] & 0x10) << 8) |
3512 ((pb->ipacket[1] & 0x0f) << 8) |
3513 (pb->ipacket[4] & 0xfd),
3514 .y = ((pb->ipacket[3] & 0x20) << 7) |
3515 ((pb->ipacket[1] & 0xf0) << 4) |
3516 (pb->ipacket[5] & 0xfd),
3518 .w = (((pb->ipacket[2] & 0x01) << 2) |
3519 (pb->ipacket[5] & 0x02) |
3520 ((pb->ipacket[4] & 0x02) >> 1)) + 8,
3525 .x = ((pb->ipacket[3] & 0x10) << 8) |
3526 ((pb->ipacket[1] & 0x0f) << 8) |
3527 pb->ipacket[4],
3528 .y = ((pb->ipacket[3] & 0x20) << 7) |
3529 ((pb->ipacket[1] & 0xf0) << 4) |
3530 pb->ipacket[5],
3542 clickpad_pressed = (pb->ipacket[0] ^ pb->ipacket[3]) & 0x01;
3664 switch (pb->ipacket[0] & 0xc0) {
3666 bcopy(pb->ipacket, sc->muxsave, 3);
3675 bcopy(pb->ipacket, pb->ipacket + 3, 3);
3676 bcopy(sc->muxsave, pb->ipacket, 3);
3678 pb->ipacket[0] &= ~(0x08 | sc->muxmsbuttons);
3679 pb->ipacket[3] &= ~(0x08 | sc->muxmsbuttons);
3680 butt = (pb->ipacket[3] & 0x03) << 2 | (pb->ipacket[0] & 0x03);
3683 pb->ipacket[0] &= 0xfc;
3684 pb->ipacket[0] |= sc->muxtpbuttons & 0x03;
3685 pb->ipacket[3] &= 0xfc;
3686 pb->ipacket[3] |= sc->muxtpbuttons >> 2 & 0x03;
3694 (pb->ipacket[0] & 0x34) == 0x04 &&
3695 (pb->ipacket[3] & 0x04) == 0x04) {
3696 pb->ipacket[0] &= 0xfb;
3697 pb->ipacket[3] &= 0xfb;
3704 if (sc->muxmsbuttons & 0x03 || pb->ipacket[0] & 0x03 ||
3707 pb->ipacket[0] &= 0xfb;
3708 sc->muxmsbuttons = pb->ipacket[0] & 0x07;
3710 pb->ipacket[4] = pb->ipacket[1];
3711 pb->ipacket[5] = pb->ipacket[2];
3712 pb->ipacket[1] = pb->ipacket[0];
3713 pb->ipacket[2] = 0;
3714 pb->ipacket[0] = 0x84 | (sc->muxtpbuttons & 0x03);
3715 pb->ipacket[3] = 0xc4 | (sc->muxtpbuttons >> 2 & 0x03);
3719 pb->ipacket[0], pb->ipacket[1], pb->ipacket[2],
3720 pb->ipacket[3], pb->ipacket[4], pb->ipacket[5]));
4387 pkt = (pb->ipacket[0] & 0xc0) == 0x80 ?
4401 switch (pb->ipacket[3] & 0x03) {
4456 nfingers = (pb->ipacket[0] & 0xc0) >> 6;
4457 if (nfingers == 3 && (pb->ipacket[3] & 0x80))
4469 f[0].w = ((pb->ipacket[0] & 0x30) >> 2) |
4470 ((pb->ipacket[3] & 0x30) >> 4);
4505 .x = (((pb->ipacket[id * 3] & 0x10) << 4) |
4506 pb->ipacket[id * 3 + 1]) << 2,
4507 .y = (((pb->ipacket[id * 3] & 0x20) << 3) |
4508 pb->ipacket[id * 3 + 2]) << 2,
4527 nfingers = (pb->ipacket[0] & 0xc0) >> 6;
4536 fn.w = ((pb->ipacket[0] & 0x30) >> 2) |
4537 ((pb->ipacket[3] & 0x30) >> 4);
4572 mask = pb->ipacket[1] & 0x1f;
4607 id = ((pb->ipacket[3] & 0xe0) >> 5) - 1;
4609 fn.w =(pb->ipacket[0] & 0xf0) >> 4;
4658 scale = (pb->ipacket[0] & 0x10) ? 5 : 1;
4660 id = ((pb->ipacket[i] & 0xe0) >> 5) - 1;
4667 (signed char)pb->ipacket[i+1] * scale);
4669 (signed char)pb->ipacket[i+2] * scale);
4692 if (!(pb->ipacket[0] & 0xC8) && !(pb->ipacket[1] & 0x7F) &&
4693 !(pb->ipacket[2] & 0x7F) && !(pb->ipacket[3] & 0xC9) &&
4694 !(pb->ipacket[0] & 0x10) != !(pb->ipacket[1] & 0x80) &&
4695 !(pb->ipacket[0] & 0x10) != !(pb->ipacket[3] & 0x10) &&
4696 !(pb->ipacket[0] & 0x20) != !(pb->ipacket[2] & 0x80) &&
4697 !(pb->ipacket[0] & 0x20) != !(pb->ipacket[3] & 0x20)) {
4699 *x = (pb->ipacket[0] & MOUSE_PS2_XNEG) ?
4700 pb->ipacket[4] - 256 : pb->ipacket[4];
4701 *y = (pb->ipacket[0] & MOUSE_PS2_YNEG) ?
4702 pb->ipacket[5] - 256 : pb->ipacket[5];
4705 ((pb->ipacket[0] & 0x01) ? MOUSE_BUTTON1DOWN : 0) |
4706 ((pb->ipacket[0] & 0x02) ? MOUSE_BUTTON3DOWN : 0) |
4707 ((pb->ipacket[0] & 0x04) ? MOUSE_BUTTON2DOWN : 0);
4736 ((pb->ipacket[0] & 0x03) ? MOUSE_BUTTON1DOWN : 0);
4739 ((pb->ipacket[0] & 0x01) ? MOUSE_BUTTON1DOWN : 0) |
4740 ((pb->ipacket[0] & 0x02) ? MOUSE_BUTTON3DOWN : 0);
4852 c = pb->ipacket[0];
4857 x0 = pb->ipacket[1] | (((pb->ipacket[4]) & 0x0f) << 8);
4858 y0 = pb->ipacket[2] | (((pb->ipacket[4]) & 0xf0) << 4);
4900 pb->ipacket[0], pb->ipacket[1], pb->ipacket[2],
4901 pb->ipacket[3], pb->ipacket[4], pb->ipacket[5]));
4939 c = pb->ipacket[0];
4946 pb->ipacket[1] |= (c & MOUSE_PS2_XOVERFLOW) ? 0x80 : 0;
4950 pb->ipacket[1] - 256 : pb->ipacket[1];
4952 pb->ipacket[2] - 256 : pb->ipacket[2];
4977 z = (pb->ipacket[3] & MOUSE_EXPLORER_ZNEG) ?
4978 (pb->ipacket[3] & 0x0f) - 16 :
4979 (pb->ipacket[3] & 0x0f);
4981 (pb->ipacket[3] & MOUSE_EXPLORER_BUTTON4DOWN) ?
4984 (pb->ipacket[3] & MOUSE_EXPLORER_BUTTON5DOWN) ?
4991 z = (char)pb->ipacket[3];
5018 ms.button |= (pb->ipacket[3] & MOUSE_PS2_BUTTON3DOWN) ?
5020 ms.button |= (pb->ipacket[3] & MOUSE_PS2_BUTTON1DOWN) ?
5022 z = (pb->ipacket[3] & MOUSE_PS2_XNEG) ?
5023 pb->ipacket[4] - 256 : pb->ipacket[4];
5050 x = (pb->ipacket[1] & 0x80) ?
5051 pb->ipacket[1] - 256 : pb->ipacket[1];
5052 y = (pb->ipacket[2] & 0x80) ?
5053 pb->ipacket[2] - 256 : pb->ipacket[2];
5084 if (pb->ipacket[2] & MOUSE_4DPLUS_BUTTON4DOWN)
5086 z = (pb->ipacket[2] & MOUSE_4DPLUS_ZNEG) ?
5087 ((pb->ipacket[2] & 0x07) - 8) :
5088 (pb->ipacket[2] & 0x07) ;
5184 pb->inputbytes = tame_mouse(sc, pb, &ms, pb->ipacket);
5200 bcopy(&pb->ipacket[0], &sc->queue.buf[sc->queue.tail], l);
5202 bcopy(&pb->ipacket[l], &sc->queue.buf[0],