Lines Matching refs:packet
506 /* Masks for the first byte of a packet */
564 if (sc->inputstate >= sizeof(sc->packet))
567 sc->packet[sc->inputstate++] = data & 0xff;
585 if (!(sc->packet[0] & 0x8)) {
587 "[0x%02x], resetting\n", sc->packet[0]));
597 if (sc->packet[0] == PMS_RSTDONE && sc->packet[1] == 0) {
609 dz = sc->packet[3];
615 dz = sc->packet[3] & 0xf;
618 if (sc->packet[3] & PMS_4BUTMASK)
620 if (sc->packet[3] & PMS_5BUTMASK)
635 newbuttons |= ((sc->packet[0] & PMS_LBUTMASK) ? 0x1 : 0) |
636 ((sc->packet[0] & PMS_MBUTMASK) ? 0x2 : 0) |
637 ((sc->packet[0] & PMS_RBUTMASK) ? 0x4 : 0);
639 dx = sc->packet[1];
645 dy = sc->packet[2];
657 DPRINTF(("pms: packet: 0x%02x%02x%02x\n",
658 sc->packet[0], sc->packet[1], sc->packet[2]));
660 DPRINTF(("pms: packet: 0x%02x%02x%02x%02x\n",
661 sc->packet[0], sc->packet[1], sc->packet[2],
662 sc->packet[3]));
674 memset(sc->packet, 0, 4);