Lines Matching defs:buf
155 uint8_t *buf, *blkptr, *lineptr;
184 pixma_fill_checksum (cb->buf + cb->cmd_header_len,
185 cb->buf + cb->cmdlen - 2);
186 cb->buf[cb->cmdlen - 1] = invcksum ? -cb->buf[cb->cmdlen - 2] : 0;
188 pixma_cmd_transaction (s, cb->buf, cb->cmdlen, cb->buf,
331 memset (mf->cb.buf, 0, 11);
335 && s->cfg->pid != MF6100_PID) ? cmd_read_image2 : cmd_read_image), mf->cb.buf);
336 mf->cb.buf[8] = flag;
337 mf->cb.buf[10] = 0x06;
343 mf->cb.reslen = pixma_cmd_transaction (s, mf->cb.buf, 11, mf->cb.buf, expected_len);
346 *info = mf->cb.buf[2];
347 *size = pixma_get_be16 (mf->cb.buf + 6); /* 16bit size */
357 *size = (*datalen + hlen == 512) ? pixma_get_be32 (mf->cb.buf + 4) - *datalen : *size;
358 memcpy (data, mf->cb.buf + hlen, *datalen);
400 read_error_info (pixma_t * s, void *buf, unsigned size)
426 if (buf && len < size)
430 memcpy (buf, data, size);
439 uint8_t buf[16];
442 len = pixma_wait_interrupt (s->io, buf, sizeof (buf), timeout);
453 if (buf[12] & 0x40)
455 if (buf[15] & 1)
540 uint8_t *buf;
546 buf = (uint8_t *) malloc (CMDBUF_SIZE);
547 if (!buf)
556 mf->cb.buf = buf;
583 free (mf->cb.buf);
584 free (mf->buf);
642 uint8_t *buf, ignore;
660 buf = (uint8_t *) realloc (mf->buf, buf_len);
661 if (!buf)
663 mf->buf = buf;
666 mf->lineptr = mf->buf;
667 mf->blkptr = mf->buf + n * s->param->line_size;