Lines Matching defs:size
55 static SANE_Status _bulk_size(SANE_Int device_number, unsigned int size);
57 static SANE_Status _bulk_in(SANE_Int device_number, SANE_Byte* data, size_t *size);
94 static PIEUSB_USB_Status _pieusb_scsi_command(SANE_Int device_number, SANE_Byte command[], SANE_Byte data[], SANE_Int size);
160 * hex dump 'size' bytes starting at 'ptr'
163 _hexdump(char *msg, unsigned char *ptr, int size)
173 if (size > 127) {
174 clipped = size;
175 size = 128;
177 while (size-- > 0)
187 if (size == 0)
233 * @param size Size of the data buffer
238 sanei_pieusb_command(SANE_Int device_number, SANE_Byte command[], SANE_Byte data[], SANE_Int size)
247 DBG (DBG_info_usb, "*** sanei_pieusb_command(%02x:%s): size 0x%02x\n", command[0], code_to_text (scsi_code_text, command[0]), size);
253 usb_status = _pieusb_scsi_command (device_number, command, data, size);
508 * @param size Size of the data buffer
512 _pieusb_scsi_command(SANE_Int device_number, SANE_Byte command[], SANE_Byte data[], SANE_Int size)
545 if (usbstat == USB_STATUS_OK && size > 0) {
549 _hexdump ("Out", data, size);
550 for (i = 0; i < size; ++i) {
570 remsize = (size_t)size;
578 DBG (DBG_error, "\t\t_pieusb_scsi_command prepare read data failed for size %u: %d\n", (unsigned int)partsize, st);
582 st = _bulk_in (device_number, data + size - remsize, &partsize);
584 DBG (DBG_error, "\t\t_pieusb_scsi_command read data failed for size %u: %d\n", (unsigned int)partsize, st);
596 _hexdump ("In", data, size);
620 * @param size Size of bulk transfer which follows (number of bytes)
623 static SANE_Status _bulk_size(SANE_Int device_number, unsigned int size) {
625 bulksize[4] = size & 0xff;
626 bulksize[5] = (size >> 8) & 0xff;
627 bulksize[6] = (size >> 16) & 0xff;
628 bulksize[7] = (size >> 24) & 0xff;
655 * @param size ptr to size of the data array / actual size on output
659 _bulk_in(SANE_Int device_number, SANE_Byte *data, size_t *size) {
664 remaining = *size;
666 /* Determine bulk size */
677 *size -= remaining;