Lines Matching defs:data

57 static SANE_Status _bulk_in(SANE_Int device_number, SANE_Byte* data, size_t *size);
81 #define PORT_PAR_DATA 0x0088 /* IEEE1284 parallel data */
86 USB_STATUS_READ = 0x01, /* read: send expected length, then read data */
94 static PIEUSB_USB_Status _pieusb_scsi_command(SANE_Int device_number, SANE_Byte command[], SANE_Byte data[], SANE_Int size);
225 * and return SENSE data in the sense fields of status if there is a CHECK
232 * @param data Input or output data buffer
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)
253 usb_status = _pieusb_scsi_command (device_number, command, data, size);
282 * PIEUSB_STATUS_CHECK_SENSE as 'sense data available'. */
484 DBG (DBG_error, "\t\t_ieee_command fails to write final data\n");
502 * The command is a SCSI_COMMAND_LEN-byte array. The data-array is used for input and output.
507 * @param data Input or output data buffer
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)
543 /* Process rest of the data, if present; either input or output, possibly bulk */
547 * send additional data to usb
549 _hexdump ("Out", data, size);
551 st = _ctrl_out_byte (device_number, PORT_SCSI_CMD, data[i]);
553 DBG (DBG_error, "\t\t_pieusb_scsi_command fails data out after %d bytes: %d\n", i, st);
557 /* Verify data out */
560 DBG (DBG_error, "\t\t_pieusb_scsi_command fails status after data out: %d\n", st);
565 /* Intermediate status OK, device has made data available for reading */
566 /* Read data */
572 DBG (DBG_info_usb, "\t\t_pieusb_scsi_command data in\n");
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);
590 /* Verify data in */
593 DBG (DBG_error, "\t\t_pieusb_scsi_command fails status after data in: %d\n", st);
596 _hexdump ("In", data, size);
651 * Bulk in transfer for data, in parts of 0x4000 bytes max
654 * @param data array holding or receiving data (must be preallocated)
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) {
668 /* DBG (DBG_info, "\t\t_bulk_in: %08x @ %p, %08x rem\n", (unsigned int)part, data, (unsigned int)remaining); */
669 r = sanei_usb_read_bulk(device_number, data, &part);
675 data += part;