upgraded Canon SCSI backend to version 1.10:

modified invocations of sanei_scsi_open() to avoid crashes with Mandrake Linux
added support of focus control for the FS2710S film scanner
DEVEL_2_0_BRANCH-1
Ulrich Deiters 2002-11-13 13:22:49 +00:00
rodzic c4f961bf5f
commit 0a43a10869
5 zmienionych plików z 40 dodań i 9 usunięć

Wyświetl plik

@ -1,5 +1,13 @@
****** Release of sane-backends 1.0.9. End of code freeze ******
2002-11-13 Ulrich Deiters <ukd@xenon.pc.uni-koeln.de>
* modified the Canon SCSI backend (now version 1.10):
* backend/canon.c, canon-scsi.c: Added support of focus control for
the FS2710 film scanner.
backend/canon-sane.c: Set handler_arg in sanei_scsi_open() calls
to zero to avoid crashes with Mandrake Linux 9.0
2002-10-23 Henning Meier-Geinitz <henning@meier-geinitz.de>
* doc/descriptions-external/gt68xx.conf: Updated status of scanners.

Wyświetl plik

@ -198,7 +198,7 @@ sane_close (SANE_Handle handle)
{
if (s->fd == -1)
{
sanei_scsi_open (s->hw->sane.name, &s->fd, sense_handler, s);
sanei_scsi_open (s->hw->sane.name, &s->fd, sense_handler, 0);
}
status = medium_position (s->fd);
if (status != SANE_STATUS_GOOD)
@ -335,7 +335,7 @@ sane_control_option (SANE_Handle handle, SANE_Int option,
memset (gbuf, 0, sizeof (gbuf));
buf_size = 256;
sanei_scsi_open (s->hw->sane.name, &s->fd, sense_handler, s);
sanei_scsi_open (s->hw->sane.name, &s->fd, sense_handler, 0);
transfer_data_type = 0x03;
DBG (21, "sending GET_DENSITY_CURVE\n");
@ -669,7 +669,8 @@ sane_control_option (SANE_Handle handle, SANE_Int option,
}
s->opt[OPT_TPU_PN].cap ^= SANE_CAP_INACTIVE;
s->opt[OPT_TPU_DCM].cap ^= SANE_CAP_INACTIVE;
*info |= SANE_INFO_RELOAD_PARAMS | SANE_INFO_RELOAD_OPTIONS;
if (info)
*info |= SANE_INFO_RELOAD_PARAMS | SANE_INFO_RELOAD_OPTIONS;
return SANE_STATUS_GOOD;
case OPT_TPU_DCM:
@ -693,6 +694,7 @@ sane_control_option (SANE_Handle handle, SANE_Int option,
}
else
s->hw->tpu.ControlMode = 0;
if (info)
*info |= SANE_INFO_RELOAD_PARAMS | SANE_INFO_RELOAD_OPTIONS;
return SANE_STATUS_GOOD;
@ -869,7 +871,7 @@ sane_control_option (SANE_Handle handle, SANE_Int option,
/* modification for FB620S */
case OPT_CALIBRATION_NOW:
sanei_scsi_open (s->hw->sane.name, &s->fd, sense_handler, s);
sanei_scsi_open (s->hw->sane.name, &s->fd, sense_handler, 0);
if (status == SANE_STATUS_GOOD)
{
@ -893,7 +895,7 @@ sane_control_option (SANE_Handle handle, SANE_Int option,
return status;
case OPT_SCANNER_SELF_DIAGNOSTIC:
sanei_scsi_open (s->hw->sane.name, &s->fd, sense_handler, s);
sanei_scsi_open (s->hw->sane.name, &s->fd, sense_handler, 0);
if (status == SANE_STATUS_GOOD)
{
status = send_diagnostic (s->fd);
@ -919,7 +921,7 @@ sane_control_option (SANE_Handle handle, SANE_Int option,
return status;
case OPT_RESET_SCANNER:
sanei_scsi_open (s->hw->sane.name, &s->fd, sense_handler, s);
sanei_scsi_open (s->hw->sane.name, &s->fd, sense_handler, 0);
if (status == SANE_STATUS_GOOD)
{
time (&(s->time1));
@ -972,7 +974,7 @@ sane_control_option (SANE_Handle handle, SANE_Int option,
return status;
case OPT_EJECT_NOW:
sanei_scsi_open (s->hw->sane.name, &s->fd, sense_handler, s);
sanei_scsi_open (s->hw->sane.name, &s->fd, sense_handler, 0);
status = medium_position (s->fd);
if (status != SANE_STATUS_GOOD)
{
@ -1230,7 +1232,7 @@ sane_start (SANE_Handle handle)
if (status != SANE_STATUS_GOOD)
return status;
status = sanei_scsi_open (s->hw->sane.name, &s->fd, sense_handler, s);
status = sanei_scsi_open (s->hw->sane.name, &s->fd, sense_handler, 0);
if (status != SANE_STATUS_GOOD)
{
DBG (1, "open of %s failed: %s\n",

Wyświetl plik

@ -309,6 +309,25 @@ execute_auto_focus (int fd, int mode, int speed, int AE, int count)
return (status);
}
static SANE_Status
execute_auto_focus_FS2710 (int fd, int mode, int AE, int count)
{
static u_char cmd[10];
int status;
DBG (7, ">> execute auto focus 2710\n");
DBG (7, ">> focus: mode='%d', count='%d'\n", mode, count);
memset (cmd, 0, sizeof (cmd));
cmd[0] = 0xe0;
cmd[1] = mode;
cmd[2] = AE;
cmd[4] = (char) (28 * ((int) (count/28.5)) - 12);
status = sanei_scsi_cmd2 (fd, cmd, sizeof (cmd), NULL, 0, NULL, NULL);
DBG (7, "<< execute auto focus2710\n");
return (status);
}
static SANE_Status
set_adf_mode (int fd, u_char priority)
{

Wyświetl plik

@ -8,6 +8,8 @@
(Canon refused to make the FS2710 documentation available,
hence not all features are supported.)
backend version: 1.10
This file is part of the SANE package.
This program is free software; you can redistribute it and/or

Wyświetl plik

@ -10,7 +10,7 @@
:backend "canon" ; name of backend
:manpage "sane-canon"
:version "0.2" ; version of backend
:version "1.10" ; version of backend
:status :alpha ; :alpha, :beta, :stable, :new
:url "http://www.rzg.mpg.de/~mpd/sane/" ; backend home page