Lines Matching refs:scanner
11 * this driver. If a certain scanner cannot handle a certain option, there's
153 struct scanner
156 /* immutable values which are set during init of scanner. */
157 struct scanner *next;
173 /* immutable values which are set during inquiry probing of the scanner. */
180 /* immutable values which are set during std VPD probing of the scanner. */
221 int need_ccal; /* scanner needs software to help with afe calibration */
227 #define FCAL_SRC_NONE 0 /* scanner does not require fine calibration */
229 #define FCAL_SRC_HW 2 /* calibration permanently stored in scanner, downloaded into struct */
231 #define FCAL_DEST_NONE 0 /* scanner does not require fine calibration */
233 #define FCAL_DEST_HW 2 /* send calibration data into scanner for use in hardware */
279 /* immutable values which are set during serial number probing scanner */
290 /* instead of in global vars so that they can differ for each scanner */
357 /* the scanner image params (what we ask from scanner) */
434 int fd; /* The scanner device file descriptor. */
606 static SANE_Status connect_fd (struct scanner *s);
607 static SANE_Status disconnect_fd (struct scanner *s);
611 static SANE_Status init_inquire (struct scanner *s);
612 static SANE_Status init_vpd (struct scanner *s);
613 static SANE_Status init_model (struct scanner *s);
614 static SANE_Status init_imprinters (struct scanner *s);
615 static SANE_Status init_panel (struct scanner *s);
616 static SANE_Status init_counters (struct scanner *s);
617 static SANE_Status init_user (struct scanner *s);
618 static SANE_Status init_options (struct scanner *s);
621 do_cmd(struct scanner *s, int runRS, int shortTime,
628 do_scsi_cmd(struct scanner *s, int runRS, int shortTime,
635 do_usb_cmd(struct scanner *s, int runRS, int shortTime,
642 do_usb_status(struct scanner *s, int runRS, int shortTime, size_t * extraLength);
644 static SANE_Status do_usb_clear(struct scanner *s, int clear, int runRS);
646 static SANE_Status wait_scanner (struct scanner *s);
648 static SANE_Status object_position (struct scanner *s, int i_load);
650 static SANE_Status ssm_buffer (struct scanner *s);
651 static SANE_Status ssm_do (struct scanner *s);
652 static SANE_Status ssm_df (struct scanner *s);
654 static int get_color_inter(struct scanner *s, int side, int res);
656 static int get_page_width (struct scanner *s);
657 static int get_page_height (struct scanner *s);
659 static SANE_Status set_window (struct scanner *s);
660 static SANE_Status update_params (struct scanner *s, int calib);
661 static SANE_Status update_i_params (struct scanner *s);
662 static SANE_Status clean_params (struct scanner *s);
664 static SANE_Status read_counters(struct scanner *s);
665 static SANE_Status read_sensors(struct scanner *s, SANE_Int option);
666 static SANE_Status read_panel(struct scanner *s, SANE_Int option);
667 static SANE_Status send_panel(struct scanner *s);
669 static SANE_Status start_scan (struct scanner *s, int type);
671 static SANE_Status check_for_cancel(struct scanner *s);
673 static SANE_Status read_from_scanner(struct scanner *s, int side, int exact);
674 static SANE_Status read_from_scanner_duplex(struct scanner *s, int exact);
676 static SANE_Status copy_simplex(struct scanner *s, unsigned char * buf, int len, int side);
677 static SANE_Status copy_duplex(struct scanner *s, unsigned char * buf, int len);
678 static SANE_Status copy_line(struct scanner *s, unsigned char * buf, int side);
679 static SANE_Status fill_image(struct scanner *s,int side);
681 static int must_downsample (struct scanner *s);
682 static int must_fully_buffer (struct scanner *s);
683 static unsigned char calc_bg_color(struct scanner *s);
685 static SANE_Status buffer_despeck(struct scanner *s, int side);
686 static SANE_Status buffer_deskew(struct scanner *s, int side);
687 static SANE_Status buffer_crop(struct scanner *s, int side);
688 static int buffer_isblank(struct scanner *s, int side);
693 static SANE_Status read_from_buffer(struct scanner *s, SANE_Byte * buf, SANE_Int max_len, SANE_Int * len, int side);
695 static SANE_Status image_buffers (struct scanner *s, int setup);
696 static SANE_Status offset_buffers (struct scanner *s, int setup);
697 static SANE_Status gain_buffers (struct scanner *s, int setup);
699 static SANE_Status calibrate_AFE(struct scanner *s);
700 static SANE_Status calibrate_fine(struct scanner *s);
701 static SANE_Status calibrate_fine_src_scan(struct scanner *s);
702 static SANE_Status calibrate_fine_src_hw(struct scanner *s);
703 static SANE_Status calibrate_fine_dest_hw(struct scanner *s);
705 static SANE_Status write_AFE (struct scanner *s);
706 static SANE_Status calibration_scan (struct scanner *s, int);
708 static SANE_Status send_imprint_positioning(struct scanner* s, int is_postimprint, int enabled);
709 static SANE_Status send_imprint_specstring(struct scanner* s, int is_postimprint);
710 static SANE_Status send_imprint_date_and_time(struct scanner* s);
711 static SANE_Status load_imprinting_settings(struct scanner *s);
712 static SANE_Status detect_imprinter(struct scanner *s, SANE_Int option);