kopia lustrzana https://gitlab.com/sane-project/backends
* backend/fujitsu.c, doc/descriptions/fujitsu.desc: backend v93
- return cmd status for reads of sensor options * backend/canon_dr.c, doc/descriptions/canon_dr.desc: backend v26 - return cmd status for reads of sensor options - allow rs to adjust read length for all bad status responsesmerge-requests/1/head
rodzic
a7a759b896
commit
3654ff9d43
|
@ -1,3 +1,10 @@
|
|||
2009-04-15 m. allan noah <kitno455 a t gmail d o t com>
|
||||
* backend/fujitsu.c, doc/descriptions/fujitsu.desc: backend v93
|
||||
- return cmd status for reads of sensor options
|
||||
* backend/canon_dr.c, doc/descriptions/canon_dr.desc: backend v26
|
||||
- return cmd status for reads of sensor options
|
||||
- allow rs to adjust read length for all bad status responses
|
||||
|
||||
2009-04-14 Stéphane Voltz <stef.dev@free.fr>
|
||||
* backend/genesys.c backend/genesys_devices.c backend/genesys_gl646.c:
|
||||
shading calibration rework for GL646 based scanners
|
||||
|
@ -6,7 +13,7 @@
|
|||
* tools/sane-desc.c: fix double summing of untested column
|
||||
|
||||
2009-04-13 Stéphane Voltz <stef.dev@free.fr>
|
||||
* backend/rts8891.c: minor version chnage to test commit scripts
|
||||
* backend/rts8891.c: minor version change to test commit scripts
|
||||
|
||||
2009-04-13 Stéphane Voltz <stef.dev@free.fr>
|
||||
* backend/pnm.c: conditional handling of STATUS_HW_LOCKED
|
||||
|
|
|
@ -178,6 +178,9 @@
|
|||
- rewrite do_usb_cmd() to use remainder from RS info
|
||||
v25 2009-04-12, MAN
|
||||
- disable SANE_FRAME_JPEG
|
||||
v26 2009-04-14, MAN (SANE 1.0.20)
|
||||
- return cmd status for reads on sensors
|
||||
- allow rs to adjust read length for all bad status responses
|
||||
|
||||
SANE FLOW DIAGRAM
|
||||
|
||||
|
@ -238,7 +241,7 @@
|
|||
#include "canon_dr.h"
|
||||
|
||||
#define DEBUG 1
|
||||
#define BUILD 25
|
||||
#define BUILD 26
|
||||
|
||||
/* values for SANE_DEBUG_CANON_DR env var:
|
||||
- errors 5
|
||||
|
@ -2051,6 +2054,7 @@ sane_control_option (SANE_Handle handle, SANE_Int option,
|
|||
{
|
||||
struct scanner *s = (struct scanner *) handle;
|
||||
SANE_Int dummy = 0;
|
||||
SANE_Status ret = SANE_STATUS_GOOD;
|
||||
|
||||
/* Make sure that all those statements involving *info cannot break (better
|
||||
* than having to do "if (info) ..." everywhere!)
|
||||
|
@ -2249,34 +2253,34 @@ sane_control_option (SANE_Handle handle, SANE_Int option,
|
|||
|
||||
/* Sensor Group */
|
||||
case OPT_START:
|
||||
read_panel(s,OPT_START);
|
||||
ret = read_panel(s,OPT_START);
|
||||
*val_p = s->panel_start;
|
||||
return SANE_STATUS_GOOD;
|
||||
return ret;
|
||||
|
||||
case OPT_STOP:
|
||||
read_panel(s,OPT_STOP);
|
||||
ret = read_panel(s,OPT_STOP);
|
||||
*val_p = s->panel_stop;
|
||||
return SANE_STATUS_GOOD;
|
||||
return ret;
|
||||
|
||||
case OPT_NEWFILE:
|
||||
read_panel(s,OPT_NEWFILE);
|
||||
ret = read_panel(s,OPT_NEWFILE);
|
||||
*val_p = s->panel_new_file;
|
||||
return SANE_STATUS_GOOD;
|
||||
return ret;
|
||||
|
||||
case OPT_COUNTONLY:
|
||||
read_panel(s,OPT_COUNTONLY);
|
||||
ret = read_panel(s,OPT_COUNTONLY);
|
||||
*val_p = s->panel_count_only;
|
||||
return SANE_STATUS_GOOD;
|
||||
return ret;
|
||||
|
||||
case OPT_BYPASSMODE:
|
||||
read_panel(s,OPT_BYPASSMODE);
|
||||
ret = read_panel(s,OPT_BYPASSMODE);
|
||||
*val_p = s->panel_bypass_mode;
|
||||
return SANE_STATUS_GOOD;
|
||||
return ret;
|
||||
|
||||
case OPT_COUNTER:
|
||||
read_panel(s,OPT_COUNTER);
|
||||
ret = read_panel(s,OPT_COUNTER);
|
||||
*val_p = s->panel_counter;
|
||||
return SANE_STATUS_GOOD;
|
||||
return ret;
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -4610,6 +4614,10 @@ do_usb_cmd(struct scanner *s, int runRS, int shortTime,
|
|||
|
||||
inLength = inOffset+*inLen;
|
||||
inActual = inLength;
|
||||
|
||||
/*blast caller's copy in case we error out*/
|
||||
*inLen = 0;
|
||||
|
||||
inTimeout = USB_DATA_TIME;
|
||||
|
||||
/* change timeout */
|
||||
|
@ -4630,19 +4638,16 @@ do_usb_cmd(struct scanner *s, int runRS, int shortTime,
|
|||
hexdump(30, "in: <<", inBuffer, inActual);
|
||||
|
||||
if(!inActual){
|
||||
*inLen = 0;
|
||||
DBG(5,"in: got no data, clearing\n");
|
||||
free(inBuffer);
|
||||
return do_usb_clear(s,1,runRS);
|
||||
}
|
||||
if(inActual < inOffset){
|
||||
*inLen = 0;
|
||||
DBG(5,"in: read shorter than inOffset\n");
|
||||
free(inBuffer);
|
||||
return SANE_STATUS_IO_ERROR;
|
||||
}
|
||||
if(ret != SANE_STATUS_GOOD){
|
||||
*inLen = 0;
|
||||
DBG(5,"in: return error '%s'\n",sane_strstatus(ret));
|
||||
free(inBuffer);
|
||||
return ret;
|
||||
|
@ -4679,27 +4684,18 @@ do_usb_cmd(struct scanner *s, int runRS, int shortTime,
|
|||
DBG(25, "stat: read %d bytes, retval %d\n", (int)statActual, ret2);
|
||||
hexdump(30, "stat: <<", statBuffer, statActual);
|
||||
|
||||
if(!statActual){
|
||||
DBG(5,"stat: got no data, clearing\n");
|
||||
free(statBuffer);
|
||||
if(inBuffer) free(inBuffer);
|
||||
return do_usb_clear(s,1,runRS);
|
||||
}
|
||||
/*weird status*/
|
||||
if(ret2 != SANE_STATUS_GOOD){
|
||||
DBG(5,"stat: return error '%s'\n",sane_strstatus(ret2));
|
||||
free(statBuffer);
|
||||
if(inBuffer) free(inBuffer);
|
||||
return ret2;
|
||||
DBG(5,"stat: clearing error '%s'\n",sane_strstatus(ret2));
|
||||
ret2 = do_usb_clear(s,1,runRS);
|
||||
}
|
||||
if(statLength != statActual){
|
||||
DBG(5,"stat: short read, %d/%d\n",(int)statLength,(int)statActual);
|
||||
free(statBuffer);
|
||||
if(inBuffer) free(inBuffer);
|
||||
return SANE_STATUS_IO_ERROR;
|
||||
/*short read*/
|
||||
else if(statLength != statActual){
|
||||
DBG(5,"stat: clearing short %d/%d\n",(int)statLength,(int)statActual);
|
||||
ret2 = do_usb_clear(s,1,runRS);
|
||||
}
|
||||
|
||||
/*inspect the last byte of the status response*/
|
||||
if(statBuffer[statLength-1]){
|
||||
else if(statBuffer[statLength-1]){
|
||||
DBG(5,"stat: status %d\n",statBuffer[statLength-1]);
|
||||
ret2 = do_usb_clear(s,0,runRS);
|
||||
}
|
||||
|
|
|
@ -425,6 +425,8 @@
|
|||
- remove unused temp file code
|
||||
v92 2009-04-12, MAN
|
||||
- disable SANE_FRAME_JPEG support (again)
|
||||
v93 2009-04-14, MAN (SANE 1.0.20)
|
||||
- return cmd status for reads on sensors
|
||||
|
||||
SANE FLOW DIAGRAM
|
||||
|
||||
|
@ -485,7 +487,7 @@
|
|||
#include "fujitsu.h"
|
||||
|
||||
#define DEBUG 1
|
||||
#define BUILD 92
|
||||
#define BUILD 93
|
||||
|
||||
/* values for SANE_DEBUG_FUJITSU env var:
|
||||
- errors 5
|
||||
|
@ -4056,6 +4058,7 @@ sane_control_option (SANE_Handle handle, SANE_Int option,
|
|||
{
|
||||
struct fujitsu *s = (struct fujitsu *) handle;
|
||||
SANE_Int dummy = 0;
|
||||
SANE_Status ret = SANE_STATUS_GOOD;
|
||||
|
||||
/* Make sure that all those statements involving *info cannot break (better
|
||||
* than having to do "if (info) ..." everywhere!)
|
||||
|
@ -4497,104 +4500,104 @@ sane_control_option (SANE_Handle handle, SANE_Int option,
|
|||
|
||||
/* Sensor Group */
|
||||
case OPT_TOP:
|
||||
get_hardware_status(s,option);
|
||||
ret = get_hardware_status(s,option);
|
||||
*val_p = s->hw_top;
|
||||
return SANE_STATUS_GOOD;
|
||||
return ret;
|
||||
|
||||
case OPT_A3:
|
||||
get_hardware_status(s,option);
|
||||
ret = get_hardware_status(s,option);
|
||||
*val_p = s->hw_A3;
|
||||
return SANE_STATUS_GOOD;
|
||||
return ret;
|
||||
|
||||
case OPT_B4:
|
||||
get_hardware_status(s,option);
|
||||
ret = get_hardware_status(s,option);
|
||||
*val_p = s->hw_B4;
|
||||
return SANE_STATUS_GOOD;
|
||||
return ret;
|
||||
|
||||
case OPT_A4:
|
||||
get_hardware_status(s,option);
|
||||
ret = get_hardware_status(s,option);
|
||||
*val_p = s->hw_A4;
|
||||
return SANE_STATUS_GOOD;
|
||||
return ret;
|
||||
|
||||
case OPT_B5:
|
||||
get_hardware_status(s,option);
|
||||
ret = get_hardware_status(s,option);
|
||||
*val_p = s->hw_B5;
|
||||
return SANE_STATUS_GOOD;
|
||||
return ret;
|
||||
|
||||
case OPT_HOPPER:
|
||||
get_hardware_status(s,option);
|
||||
ret = get_hardware_status(s,option);
|
||||
*val_p = s->hw_hopper;
|
||||
return SANE_STATUS_GOOD;
|
||||
return ret;
|
||||
|
||||
case OPT_OMR:
|
||||
get_hardware_status(s,option);
|
||||
ret = get_hardware_status(s,option);
|
||||
*val_p = s->hw_omr;
|
||||
return SANE_STATUS_GOOD;
|
||||
return ret;
|
||||
|
||||
case OPT_ADF_OPEN:
|
||||
get_hardware_status(s,option);
|
||||
ret = get_hardware_status(s,option);
|
||||
*val_p = s->hw_adf_open;
|
||||
return SANE_STATUS_GOOD;
|
||||
return ret;
|
||||
|
||||
case OPT_SLEEP:
|
||||
get_hardware_status(s,option);
|
||||
ret = get_hardware_status(s,option);
|
||||
*val_p = s->hw_sleep;
|
||||
return SANE_STATUS_GOOD;
|
||||
return ret;
|
||||
|
||||
case OPT_SEND_SW:
|
||||
get_hardware_status(s,option);
|
||||
ret = get_hardware_status(s,option);
|
||||
*val_p = s->hw_send_sw;
|
||||
return SANE_STATUS_GOOD;
|
||||
return ret;
|
||||
|
||||
case OPT_MANUAL_FEED:
|
||||
get_hardware_status(s,option);
|
||||
ret = get_hardware_status(s,option);
|
||||
*val_p = s->hw_manual_feed;
|
||||
return SANE_STATUS_GOOD;
|
||||
return ret;
|
||||
|
||||
case OPT_SCAN_SW:
|
||||
get_hardware_status(s,option);
|
||||
ret = get_hardware_status(s,option);
|
||||
*val_p = s->hw_scan_sw;
|
||||
return SANE_STATUS_GOOD;
|
||||
return ret;
|
||||
|
||||
case OPT_FUNCTION:
|
||||
get_hardware_status(s,option);
|
||||
ret = get_hardware_status(s,option);
|
||||
*val_p = s->hw_function;
|
||||
return SANE_STATUS_GOOD;
|
||||
return ret;
|
||||
|
||||
case OPT_INK_EMPTY:
|
||||
get_hardware_status(s,option);
|
||||
ret = get_hardware_status(s,option);
|
||||
*val_p = s->hw_ink_empty;
|
||||
return SANE_STATUS_GOOD;
|
||||
return ret;
|
||||
|
||||
case OPT_DOUBLE_FEED:
|
||||
get_hardware_status(s,option);
|
||||
ret = get_hardware_status(s,option);
|
||||
*val_p = s->hw_double_feed;
|
||||
return SANE_STATUS_GOOD;
|
||||
return ret;
|
||||
|
||||
case OPT_ERROR_CODE:
|
||||
get_hardware_status(s,option);
|
||||
ret = get_hardware_status(s,option);
|
||||
*val_p = s->hw_error_code;
|
||||
return SANE_STATUS_GOOD;
|
||||
return ret;
|
||||
|
||||
case OPT_SKEW_ANGLE:
|
||||
get_hardware_status(s,option);
|
||||
ret = get_hardware_status(s,option);
|
||||
*val_p = s->hw_skew_angle;
|
||||
return SANE_STATUS_GOOD;
|
||||
return ret;
|
||||
|
||||
case OPT_INK_REMAIN:
|
||||
get_hardware_status(s,option);
|
||||
ret = get_hardware_status(s,option);
|
||||
*val_p = s->hw_ink_remain;
|
||||
return SANE_STATUS_GOOD;
|
||||
return ret;
|
||||
|
||||
case OPT_DENSITY_SW:
|
||||
get_hardware_status(s,option);
|
||||
ret = get_hardware_status(s,option);
|
||||
*val_p = s->hw_density_sw;
|
||||
return SANE_STATUS_GOOD;
|
||||
return ret;
|
||||
|
||||
case OPT_DUPLEX_SW:
|
||||
get_hardware_status(s,option);
|
||||
ret = get_hardware_status(s,option);
|
||||
*val_p = s->hw_duplex_sw;
|
||||
return SANE_STATUS_GOOD;
|
||||
return ret;
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -5191,6 +5194,8 @@ get_hardware_status (struct fujitsu *s, SANE_Int option)
|
|||
if(inLen > 9){
|
||||
s->hw_ink_remain = get_GHS_ink_remain(in);
|
||||
}
|
||||
|
||||
ret = SANE_STATUS_GOOD;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5216,8 +5221,8 @@ get_hardware_status (struct fujitsu *s, SANE_Int option)
|
|||
);
|
||||
|
||||
/* parse the rs data */
|
||||
if(ret == SANE_STATUS_GOOD && get_RS_sense_key(in)==0
|
||||
&& get_RS_ASC(in)==0x80){
|
||||
if(ret == SANE_STATUS_GOOD){
|
||||
if(get_RS_sense_key(in)==0 && get_RS_ASC(in)==0x80){
|
||||
|
||||
s->hw_adf_open = get_RS_adf_open(in);
|
||||
s->hw_send_sw = get_RS_send_sw(in);
|
||||
|
@ -5227,9 +5232,10 @@ get_hardware_status (struct fujitsu *s, SANE_Int option)
|
|||
s->hw_hopper = get_RS_hopper(in);
|
||||
s->hw_function = get_RS_function(in);
|
||||
s->hw_density_sw = get_RS_density(in);
|
||||
}
|
||||
else{
|
||||
return SANE_STATUS_GOOD;
|
||||
}
|
||||
else{
|
||||
DBG (10, "get_hardware_status: unexpected RS values\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,9 +11,9 @@
|
|||
|
||||
:backend "canon_dr" ; name of backend
|
||||
:url "http://www.thebility.com/canon/"
|
||||
:version "24" ; version of backend
|
||||
:version "26" ; version of backend
|
||||
:manpage "sane-canon_dr" ; name of manpage (if it exists)
|
||||
:comment "New backend as of SANE release 1.1.0, testers needed, see manpage"
|
||||
:comment "New backend as of SANE release 1.0.20, testers needed, see manpage"
|
||||
:devicetype :scanner ; start of a list of devices....
|
||||
; other types: :stillcam, :vidcam,
|
||||
; :meta, :api
|
||||
|
|
|
@ -11,9 +11,9 @@
|
|||
|
||||
:backend "fujitsu" ; name of backend
|
||||
:url "http://www.thebility.com/fujitsu/"
|
||||
:version "90" ; version of backend
|
||||
:version "93" ; version of backend
|
||||
:manpage "sane-fujitsu" ; name of manpage (if it exists)
|
||||
:comment "Backend updated for SANE release 1.1.0, see sane-fujitsu manpage"
|
||||
:comment "Backend updated for SANE release 1.0.20, see sane-fujitsu manpage"
|
||||
:devicetype :scanner ; start of a list of devices....
|
||||
; other types: :stillcam, :vidcam,
|
||||
; :meta, :api
|
||||
|
@ -144,6 +144,18 @@
|
|||
:usbid "0x04c5" "0x1150"
|
||||
:comment "small, current"
|
||||
|
||||
:model "ScanSnap S1500"
|
||||
:interface "USB"
|
||||
:status :untested
|
||||
;:usbid "0x04c5" "0x1155"
|
||||
:comment "small, current"
|
||||
|
||||
:model "ScanSnap S1500M"
|
||||
:interface "USB"
|
||||
:status :untested
|
||||
;:usbid "0x04c5" "0x"
|
||||
:comment "small, current"
|
||||
|
||||
;==================================================
|
||||
; DISCONTINUED OLDER MODELS, MEDIUM
|
||||
:model "M3093E"
|
||||
|
|
Ładowanie…
Reference in New Issue