Lines Matching defs:scanner
386 /* wait (via polling) until scanner seems "ready" */
538 /* to the scanner in-between scans) */
673 /* start the scanner a-scannin' */
709 /* stop the scanner a-scannin' */
780 /* get scanlines from scanner */
801 /* download color LUT to scanner (if it takes one) */
815 /* skip if scanner doesn't take 'em */
1489 /* Parse an INQUIRY information block, as returned by scanner */
1674 within the scanner... (do others too?) */
1699 set, the scanner supports the value, otherwise it doesn't.
1776 /* Dump all we know about scanner to stderr */
1918 /* Dump all we know about some unknown scanner to stderr */
1987 DBG(15, "id_microtek: not even a scanner: dev_type = %d\n",
2056 /* this might be a newer scanner, which uses the SCSI II command set. */
2067 DBG(1, "brand-new Microtek scanner, which uses\n");
2087 DBG(1, "Your scanner appears to be supported \n");
2092 DBG(1, "Please send the scanner inquiry log in\n");
2094 DBG(1, "include a description of the scanner, \n");
2116 /* Try to attach a device as a Microtek scanner */
2156 DBG(15, "attach_scanner: device doesn't look like a Microtek scanner.");
2172 dev->sane.type = "flatbed scanner";
2187 /* Attach a scanner (convenience wrapper for find_scanners...) */
2209 /* stop the scanner */
2246 /* number of lines of calibration data returned by scanner */
2271 /* of the STRIPS# values read by the scanner, presumably off some */
2273 /* The raw scanner data does indeed resemble the intensity profile */
2322 /* Calibrate scanner CCD, the "real" way. */
2341 /* tell scanner to read it's little chart */
2419 /* Cause scanner to calibrate, but don't really scan anything */
2434 /* some small range, but large enough to cause the scanner
2479 /* Calibrate scanner, if necessary; record results */
2487 /* try to check if scanner has been reset */
2568 /***** ...process raw scanner bytes, and shove into *****/
2942 /* Request bytes from scanner (and put in scsi_buffer) */
2969 /* grab them bytes! (only if the scanner still has bytes to give...) */
2987 /* Process scanner bytes, and shove in ring_buffer */
3068 /* default to /dev/scanner instead of insisting on config file */
3070 attach_scanner("/dev/scanner", 0);
3134 Microtek_Scanner *scanner;
3155 /* create a scanner... */
3156 DBG(23, "sane_open: create scanner...\n");
3157 scanner = malloc(sizeof(*scanner));
3158 if (!scanner) return SANE_STATUS_NO_MEM;
3159 memset(scanner, 0, sizeof(*scanner));
3161 /* initialize scanner dependent stuff */
3162 DBG(23, "sane_open: initialize scanner dependent stuff...\n");
3164 scanner->unit_type =
3166 scanner->res_type =
3168 scanner->midtone_support =
3170 scanner->paper_length =
3171 (scanner->unit_type == MS_UNIT_PIXELS) ?
3179 scanner->bright_r = 0;
3180 scanner->bright_g = 0;
3181 scanner->bright_b = 0;
3187 scanner->allow_calibrate = SANE_FALSE;
3188 scanner->do_real_calib = SANE_TRUE;
3189 scanner->do_clever_precal = SANE_FALSE;
3193 scanner->allow_calibrate = SANE_FALSE;
3194 scanner->do_real_calib = SANE_FALSE;
3195 scanner->do_clever_precal = SANE_TRUE;
3198 scanner->allow_calibrate = SANE_TRUE;
3199 scanner->do_real_calib = SANE_FALSE;
3200 scanner->do_clever_precal = SANE_FALSE;
3203 scanner->onepass = (dev->info.modes & MI_MODES_ONEPASS);
3204 scanner->allowbacktrack = SANE_TRUE; /* ??? XXXXXXX */
3205 scanner->reversecolors = SANE_FALSE;
3206 scanner->fastprescan = SANE_FALSE;
3207 scanner->bits_per_color = 8;
3213 scanner->gamma_entries = dev->info.max_lookup_size;
3214 scanner->gamma_entry_size = dev->info.gamma_size;
3215 scanner->gamma_bit_depth = dev->info.max_gamma_bit_depth;
3216 max_entry = (1 << scanner->gamma_bit_depth) - 1;
3217 scanner->gamma_entry_range.min = 0;
3218 scanner->gamma_entry_range.max = max_entry;
3219 scanner->gamma_entry_range.quant = 1;
3221 scanner->gray_lut = calloc(scanner->gamma_entries,
3222 sizeof(scanner->gray_lut[0]));
3223 scanner->red_lut = calloc(scanner->gamma_entries,
3224 sizeof(scanner->red_lut[0]));
3225 scanner->green_lut = calloc(scanner->gamma_entries,
3226 sizeof(scanner->green_lut[0]));
3227 scanner->blue_lut = calloc(scanner->gamma_entries,
3228 sizeof(scanner->blue_lut[0]));
3229 if ((scanner->gray_lut == NULL) ||
3230 (scanner->red_lut == NULL) ||
3231 (scanner->green_lut == NULL) ||
3232 (scanner->blue_lut == NULL)) {
3234 scanner->gamma_entries);
3236 free(scanner->gray_lut);
3237 free(scanner->red_lut);
3238 free(scanner->green_lut);
3239 free(scanner->blue_lut);
3241 for (j=0; j<scanner->gamma_entries; j += scanner->gamma_entry_size) {
3244 ((double) scanner->gamma_entries - 1.0) + 0.5);
3245 scanner->gray_lut[j] = v;
3246 scanner->red_lut[j] = v;
3247 scanner->green_lut[j] = v;
3248 scanner->blue_lut[j] = v;
3253 scanner->gamma_entries = 0;
3254 scanner->gray_lut = NULL;
3255 scanner->red_lut = NULL;
3256 scanner->green_lut = NULL;
3257 scanner->blue_lut = NULL;
3261 scanner->scanning = SANE_FALSE;
3262 scanner->this_pass = 0;
3263 scanner->sfd = -1;
3264 scanner->dev = dev;
3265 scanner->sense_flags = 0;
3266 scanner->scan_started = SANE_FALSE;
3267 scanner->woe = SANE_FALSE;
3268 scanner->cancel = SANE_FALSE;
3275 scanner->mode_sense_cache[j] = 0;
3276 scanner->precal_record = MS_PRECAL_NONE;
3280 if ((status = init_options(scanner)) != SANE_STATUS_GOOD) return status;
3282 scanner->next = first_handle;
3283 first_handle = scanner;
3284 *handle = scanner;
3331 Microtek_Scanner *scanner = handle;
3335 return &(scanner->sod[option]);
3350 Microtek_Scanner *scanner = handle;
3358 sod = scanner->sod;
3359 val = scanner->val;
3362 if (scanner->scanning) return SANE_STATUS_DEVICE_BUSY;
3364 if (scanner->this_pass != 0) return SANE_STATUS_DEVICE_BUSY;
3367 (!SANE_OPTION_IS_ACTIVE(scanner->sod[option].cap)) )
3460 if (scanner->midtone_support) {
3488 sod[OPT_RESOLUTION].constraint.range = &(scanner->exp_res_range);
3491 sod[OPT_RESOLUTION].constraint.range = &(scanner->res_range);
3500 if (!(val[option].w)) scanner->precal_record = MS_PRECAL_NONE;
3595 /* if (scanner->dev->info.modes & MI_MODES_ONEPASS)
3654 } else { /* 3-pass scanner */
3738 * scanner coords are in 'units' -- pixels or 1/8"
3750 * real values come from scanner after sane_start.
3761 /* calculate pixels per scanline returned by scanner... */
3762 /* scanner (E6 at least) always seems to return