Lines Matching defs:buf
102 unsigned char buf[BUFLEN];
116 memmove(mouse->buf, mouse->buf + num, BUFLEN - num);
131 mouse->buf[mouse->count++] = byte;
167 if (!IS_HDR_BYTE(mouse->buf[0])) {
168 DBG("vsck: len=%d, 1st=0x%02x\n", packet_len, mouse->buf[0]);
174 if (IS_HDR_BYTE(mouse->buf[i])) {
179 packet_len, i, mouse->buf[i]);
190 return mouse->count >= len && MATCH_PACKET_TYPE(mouse->buf[0], type);
196 unsigned char *buf = mouse->buf;
213 dx = buf[1] & 0x7f;
214 dx *= ((buf[0] >> 4) & 0x01) ? 1 : -1;
220 dy = buf[2] & 0x7f;
221 dy *= ((buf[0] >> 3) & 0x01) ? -1 : 1;
227 left = buf[0] & 0x04;
228 middle = buf[0] & 0x02;
229 right = buf[0] & 0x01;
252 unsigned char *buf = mouse->buf;
270 x = ((buf[2] & 0x3f) << 6) | (buf[1] & 0x3f);
271 y = ((buf[4] & 0x3f) << 6) | (buf[3] & 0x3f);
277 left = buf[0] & 0x02;
278 middle = buf[0] & 0x04;
279 right = buf[0] & 0x08;
280 touch = buf[0] & 0x10;
304 unsigned char *buf = mouse->buf;
326 mouse->version = buf[0] & 0x0f;
327 mouse->country = (buf[1] >> 4) & 0x07;
328 mouse->type = buf[1] & 0x0f;
329 error = buf[2] & 0x7f;
336 left = buf[0] & 0x04;
337 middle = buf[0] & 0x02;
338 right = buf[0] & 0x01;
374 unsigned char *buf = mouse->buf;
388 while (mouse->count > 0 && !IS_HDR_BYTE(buf[0])) {