* backend/epson.[ch]: Added support for GT-30000, with support for the

ADF in simplex mode (used some code from the EPSON Kowa IScan version
  of the backend)
* backend/epson_scsi.c: Use sanei_scsi_cmd2() to send commands to fix a problem
  with SBP-2 under FreeBSD
merge-requests/1/head
Karl Heinz Kremer 2003-08-15 17:07:58 +00:00
rodzic d54f39f55b
commit 4bd825cac8
4 zmienionych plików z 630 dodań i 170 usunięć

Wyświetl plik

@ -1,3 +1,11 @@
2003-08-15 Karl Heinz Kremer <khk@khk.net>
* backend/epson.[ch]: Added support for GT-30000, with support for the
ADF in simplex mode (used some code from the EPSON Kowa IScan version
of the backend)
* backend/epson_scsi.c: Use sanei_scsi_cmd2() to send commands to fix a problem
with SBP-2 under FreeBSD
2003-08-15 Stéphane Voltz <svoltz@wanadoo.fr>
* backend/umax_pp.c backend/umax_pp.h: added a check of values passed

Plik diff jest za duży Load Diff

Wyświetl plik

@ -107,6 +107,7 @@ typedef struct {
unsigned char request_extended_status; /* get extended status from scanner */
unsigned char control_an_extension; /* for extension control */
unsigned char eject; /* for extension control */
unsigned char feed;
unsigned char request_push_button_status;
unsigned char control_auto_area_segmentation;
unsigned char set_film_type; /* for extension control */
@ -167,6 +168,7 @@ enum
, OPT_FOCUS
, OPT_BAY
, OPT_EJECT
, OPT_ADF_MODE
, NUM_OPTIONS
};
@ -230,9 +232,10 @@ struct Epson_Device {
SANE_Word *resolution_list; /* for display purposes we store a second copy */
SANE_Bool extension; /* extension is installed */
SANE_Bool use_extension; /* use the installed extension */
SANE_Int use_extension; /* use the installed extension */
SANE_Bool TPU; /* TPU is installed */
SANE_Bool ADF; /* ADF is installed */
SANE_Bool duplexSupport; /* does the ADF handle duplex scanning */
SANE_Bool focusSupport; /* does this scanner have support for "set focus position" ? */
SANE_Bool color_shuffle; /* does this scanner need color shuffling */
SANE_Int maxDepth; /* max. color depth */
@ -240,10 +243,19 @@ struct Epson_Device {
SANE_Int optical_res; /* optical resolution */
SANE_Int max_line_distance;
SANE_Bool need_double_vertical;
SANE_Bool need_color_reorder;
SANE_Bool need_double_vertical;
SANE_Bool need_color_reorder;
SANE_Bool need_reset_on_source_change;
SANE_Bool wait_for_button; /* do we have to wait until the scanner button is pressed? */
SANE_Int fbf_max_x;
SANE_Int fbf_max_y;
SANE_Int adf_max_x;
SANE_Int adf_max_y;
SANE_Int devtype;
SANE_Bool wait_for_button; /* do we have to wait until the scanner button is pressed? */
EpsonCmd cmd;
};
@ -281,6 +293,7 @@ struct Epson_Scanner {
SANE_Int line_distance; /* current line distance */
SANE_Int current_output_line; /* line counter when color shuffling */
SANE_Int lines_written; /* debug variable */
SANE_Bool option_has_changed; /* did one of the options change it's value? */
};
typedef struct Epson_Scanner Epson_Scanner;

Wyświetl plik

@ -1,6 +1,7 @@
#ifdef _AIX
# include "../include/lalloca.h" /* MUST come first for AIX! */
#endif
#include <string.h> /* for memset and memcpy */
#include "../include/sane/config.h"
#include <sane/sanei_debug.h>
#include <sane/sanei_scsi.h>
@ -21,7 +22,6 @@
#endif
#include <stdio.h>
#include <string.h>
/*
* sense handler for the sanei_scsi_XXX comands
@ -93,15 +93,15 @@ sanei_epson_scsi_write(int fd, const void * buf, size_t buf_size, SANE_Status *
{
u_char * cmd;
cmd = alloca( 6 + buf_size);
memset( cmd, 0, 6);
cmd = alloca(8 + buf_size);
memset( cmd, 0, 8);
cmd[ 0] = WRITE_6_COMMAND;
cmd[ 2] = buf_size >> 16;
cmd[ 3] = buf_size >> 8;
cmd[ 4] = buf_size;
memcpy( cmd + 6, buf, buf_size);
memcpy( cmd + 8, buf, buf_size);
if( SANE_STATUS_GOOD == ( *status = sanei_scsi_cmd( fd, cmd, 6 + buf_size, NULL, NULL)))
if( SANE_STATUS_GOOD == ( *status = sanei_scsi_cmd2( fd, cmd, 6, cmd + 8, buf_size, NULL, NULL)))
return buf_size;
return 0;