Lines Matching defs:inq
73 static SANE_Status pieusb_initialize_device_definition (Pieusb_Device_Definition* dev, Pieusb_Scanner_Properties* inq, const char* devicename, SANE_Word vendor_id, SANE_Word product_id);
213 Pieusb_Scanner_Properties inq;
245 sanei_pieusb_cmd_inquiry (device_number, &inq, 5, &status);
266 sanei_pieusb_cmd_inquiry(device_number, &inq, inq.additionalLength+4, &status);
278 r = pieusb_initialize_device_definition(dev, &inq, devicename, pieusb_supported_usb_device.vendor, pieusb_supported_usb_device.product);
287 if (inq.model != pieusb_supported_usb_device.model) {
289 DBG (DBG_error, "sanei_pieusb_find_device_callback: wrong model number %d\n", inq.model);
310 pieusb_initialize_device_definition (Pieusb_Device_Definition* dev, Pieusb_Scanner_Properties* inq, const char* devicename,
323 memcpy(buf, inq->vendor, 8);
333 memcpy(buf, inq->product, 16);
347 memcpy(buf, inq->productRevision, 4);
353 dev->model = inq->model;
356 dev->maximum_resolution_x = inq->maxResolutionX;
357 dev->maximum_resolution_y = inq->maxResolutionY;
369 dev->scan_bed_width = (double) inq->maxScanWidth / dev->maximum_resolution;
370 dev->scan_bed_height = (double) inq->maxScanHeight / dev->maximum_resolution;
371 dev->slide_top_left_x = inq->x0;
372 dev->slide_top_left_y = inq->y0;
373 dev->slide_width = (double) (inq->x1 - inq->x0) / dev->maximum_resolution;
374 dev->slide_height = (double) (inq->y1 - inq->y0) / dev->maximum_resolution;
377 dev->halftone_patterns = inq->halftones & 0x0f;
378 dev->color_filters = inq->filters;
379 dev->color_depths = inq->colorDepths;
380 dev->color_formats = inq->colorFormat;
381 dev->image_formats = inq->imageFormat;
382 dev->scan_capabilities = inq->scanCapability;
383 dev->optional_devices = inq->optionalDevices;
384 dev->enhancements = inq->enhancements;
385 dev->gamma_bits = inq->gammaBits;
386 dev->fast_preview_resolution = inq->previewScanResolution;
387 dev->minimum_highlight = inq->minumumHighlight;
388 dev->maximum_shadow = inq->maximumShadow;
389 dev->calibration_equation = inq->calibrationEquation;
390 dev->minimum_exposure = inq->minimumExposure;
391 dev->maximum_exposure = inq->maximumExposure*4; /* *4 to solve the strange situation that the default value is out of range */
393 dev->x0 = inq->x0;
394 dev->y0 = inq->y0;
395 dev->x1 = inq->x1;
396 dev->y1 = inq->y1;
397 dev->production = strndup(inq->production, 4);
398 dev->timestamp = strndup(inq->timestamp, 20);
399 dev->signature = (char *)strndup((char *)inq->signature, 40);
431 /*TODO: create from inq->filters */
456 /*TODO: create from inq->colorDepths? Maybe not: didn't experiment with