Lines Matching defs:model
60 Added model check via INQUIRY, and related changes.
66 maxread entry to model struct. Tested with SANE 1.0.2.
199 ST400_Model *model;
236 for( model = st400_models; model->inq_vendor; model++ ) {
237 if( str_at_offset(model->inq_vendor, model->inq_voffset, inqdata.bytes) && str_at_offset(model->inq_model, model->inq_moffset, inqdata.bytes) ) {
238 *modelP = model;
239 DBG(DINFO, "found matching scanner model \"%s %s\" in list\n", model->sane_vendor, model->sane_model);
339 th = (double)maxval(dev->model->bits) * SANE_UNFIX(dev->val[OPT_THRESHOLD]) / 100.0;
388 dev->wh = dev->model->bufsize / dev->params.bytes_per_line;
490 ST400_Model *model;
514 status = st400_inquiry(fd, &model);
530 dev->sane.vendor = model->sane_vendor;
531 dev->sane.model = model->sane_model;
532 dev->sane.type = model->sane_type;
538 dev->model = model;
630 st400_devices->model->bufsize = arg; /* FIXME: changes bufsize for all scanners of this model! */
638 st400_devices->model->bits = arg; /* FIXME */
646 st400_devices->model->maxread = arg; /* FIXME */
651 st400_devices->model->dpi_list = malloc(16 * sizeof(SANE_Int));
657 st400_devices->model->dpi_list[i] = (SANE_Int)arg;
660 st400_devices->model->dpi_list[0] = i;
843 if( dev->model->dpi_list )
844 dev->opt[OPT_RESOLUTION].constraint.word_list = dev->model->dpi_list;
1132 if( dev->model->maxread > 0 )
1133 dev->bufsize = min(dev->model->maxread, (unsigned int) sanei_scsi_max_request_size);
1246 if( dev->val[OPT_DEPTH] == 1 || dev->model->bits == 8 ) {
1268 mv = (SANE_Byte)maxval(dev->model->bits);
1273 val <<= (8 - dev->model->bits);
1274 val += (val >> dev->model->bits);