2003-01-12 19:44:26 +00:00
|
|
|
/* sane - Scanner Access Now Easy.
|
|
|
|
Copyright (C) 2000-2003 Jochen Eisinger <jochen.eisinger@gmx.net>
|
|
|
|
This file is part of the SANE package.
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU General Public License as
|
|
|
|
published by the Free Software Foundation; either version 2 of the
|
|
|
|
License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful, but
|
|
|
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
|
|
|
MA 02111-1307, USA.
|
|
|
|
|
|
|
|
As a special exception, the authors of SANE give permission for
|
|
|
|
additional uses of the libraries contained in this release of SANE.
|
|
|
|
|
|
|
|
The exception is that, if you link a SANE library with other files
|
|
|
|
to produce an executable, this does not by itself cause the
|
|
|
|
resulting executable to be covered by the GNU General Public
|
|
|
|
License. Your use of that executable is in no way restricted on
|
|
|
|
account of linking the SANE library code into it.
|
|
|
|
|
|
|
|
This exception does not, however, invalidate any other reasons why
|
|
|
|
the executable file might be covered by the GNU General Public
|
|
|
|
License.
|
|
|
|
|
|
|
|
If you submit changes to SANE to the maintainers to be included in
|
|
|
|
a subsequent release, you agree by submitting the changes that
|
|
|
|
those changes may be distributed with this exception intact.
|
|
|
|
|
|
|
|
If you write modifications of your own for SANE, it is your choice
|
|
|
|
whether to permit this exception to apply to your modifications.
|
|
|
|
If you do not wish that, delete this exception notice.
|
|
|
|
|
|
|
|
This file implements the hardware driver scanners using a 300dpi CCD */
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
2003-01-12 19:44:26 +00:00
|
|
|
#include "mustek_pp_ccd300.h"
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
#define MUSTEK_PP_CCD300 4
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
static void config_ccd_101x (Mustek_pp_Handle * dev);
|
|
|
|
static void config_ccd (Mustek_pp_Handle * dev);
|
|
|
|
static void lamp (Mustek_pp_Handle * dev, int lamp_on);
|
|
|
|
|
|
|
|
#define CCD300_ASIC1013 0xa8
|
|
|
|
#define CCD300_ASIC1015 0xa5
|
|
|
|
|
|
|
|
#define CCD300_CHANNEL_RED 0
|
|
|
|
#define CCD300_CHANNEL_GREEN 1
|
|
|
|
#define CCD300_CHANNEL_BLUE 2
|
|
|
|
#define CCD300_CHANNEL_GRAY 1
|
|
|
|
|
|
|
|
#define CCD300_MAXHSIZE 2600
|
|
|
|
#define CCD300_MAXVSIZE 3500
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Here starts the driver code for the different chipsets
|
|
|
|
*
|
|
|
|
* The 1013 & 1015 chipsets share large portions of the code. This
|
|
|
|
* shared functions end with _101x.
|
|
|
|
*/
|
|
|
|
|
|
|
|
static const u_char chan_codes_1013[] = { 0x82, 0x42, 0xC2 };
|
|
|
|
static const u_char chan_codes_1015[] = { 0x80, 0x40, 0xC0 };
|
|
|
|
static const u_char fullstep[] = { 0x09, 0x0C, 0x06, 0x03 };
|
|
|
|
static const u_char halfstep[] = { 0x02, 0x03, 0x01, 0x09,
|
|
|
|
0x08, 0x0C, 0x04, 0x06
|
|
|
|
};
|
|
|
|
static const u_char voltages[4][3] = { {0x5C, 0x5A, 0x63},
|
|
|
|
{0xE6, 0xB4, 0xBE},
|
|
|
|
{0xB4, 0xB4, 0xB4},
|
|
|
|
{0x64, 0x50, 0x64}
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Forward declarations of 1013/1015 functions */
|
|
|
|
static void set_ccd_channel_1013 (Mustek_pp_Handle * dev, int channel);
|
|
|
|
static void motor_backward_1013 (Mustek_pp_Handle * dev);
|
|
|
|
static void return_home_1013 (Mustek_pp_Handle * dev);
|
|
|
|
static void motor_forward_1013 (Mustek_pp_Handle * dev);
|
|
|
|
static void config_ccd_1013 (Mustek_pp_Handle * dev);
|
|
|
|
|
|
|
|
static void set_ccd_channel_1015 (Mustek_pp_Handle * dev, int channel);
|
|
|
|
/* static void motor_backward_1015 (Mustek_pp_Handle * dev); */
|
|
|
|
static void return_home_1015 (Mustek_pp_Handle * dev, SANE_Bool nowait);
|
|
|
|
static void motor_forward_1015 (Mustek_pp_Handle * dev);
|
|
|
|
static void config_ccd_1015 (Mustek_pp_Handle * dev);
|
|
|
|
|
|
|
|
|
|
|
|
/* These functions are common to all 1013/1015 chipsets */
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
static void
|
|
|
|
set_led (Mustek_pp_Handle * dev)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
mustek_pp_ccd300_priv *priv = dev->priv;
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
sanei_pa4s2_writebyte (dev->fd, 6,
|
|
|
|
(priv->motor_step % 5 == 0 ? 0x03 : 0x13));
|
2003-01-12 19:44:26 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2003-01-13 19:49:47 +00:00
|
|
|
static void
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
set_sti (Mustek_pp_Handle * dev)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
mustek_pp_ccd300_priv *priv = dev->priv;
|
|
|
|
|
|
|
|
sanei_pa4s2_writebyte (dev->fd, 3, 0);
|
|
|
|
priv->bank_count++;
|
|
|
|
priv->bank_count &= 7;
|
2003-01-12 19:44:26 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2003-01-13 19:49:47 +00:00
|
|
|
static void
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
get_bank_count (Mustek_pp_Handle * dev)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
u_char val;
|
|
|
|
mustek_pp_ccd300_priv *priv = dev->priv;
|
|
|
|
|
|
|
|
sanei_pa4s2_readbegin (dev->fd, 3);
|
|
|
|
sanei_pa4s2_readbyte (dev->fd, &val);
|
|
|
|
sanei_pa4s2_readend (dev->fd);
|
|
|
|
|
|
|
|
priv->bank_count = (val & 0x07);
|
2003-01-12 19:44:26 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2003-01-13 19:49:47 +00:00
|
|
|
static void
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
reset_bank_count (Mustek_pp_Handle * dev)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
sanei_pa4s2_writebyte (dev->fd, 6, 7);
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
|
|
|
|
2003-01-13 19:49:47 +00:00
|
|
|
static void
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
wait_bank_change (Mustek_pp_Handle * dev, int bankcount, int niceload)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
struct timeval start, end;
|
|
|
|
unsigned long diff;
|
|
|
|
mustek_pp_ccd300_priv *priv = dev->priv;
|
|
|
|
int first_time = 1;
|
|
|
|
|
|
|
|
gettimeofday (&start, NULL);
|
|
|
|
|
|
|
|
do
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
if ((niceload == 0) && (first_time == 0))
|
|
|
|
{
|
|
|
|
usleep (1); /* could be as well sched_yield */
|
|
|
|
first_time = 0;
|
|
|
|
}
|
|
|
|
get_bank_count (dev);
|
|
|
|
|
|
|
|
gettimeofday (&end, NULL);
|
|
|
|
diff = (end.tv_sec * 1000 + end.tv_usec / 1000) -
|
|
|
|
(start.tv_sec * 1000 + start.tv_usec / 1000);
|
|
|
|
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
while ((priv->bank_count != bankcount) && (diff < priv->wait_bank));
|
|
|
|
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
|
|
|
|
2003-01-13 19:49:47 +00:00
|
|
|
static void
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
set_dpi_value (Mustek_pp_Handle * dev)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
u_char val = 0;
|
|
|
|
mustek_pp_ccd300_priv *priv = dev->priv;
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
sanei_pa4s2_writebyte (dev->fd, 6, 0x80);
|
|
|
|
|
|
|
|
switch (priv->hwres)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
case 100:
|
|
|
|
val = 0x00;
|
|
|
|
break;
|
|
|
|
case 200:
|
|
|
|
val = 0x10;
|
|
|
|
break;
|
|
|
|
case 300:
|
|
|
|
val = 0x20;
|
|
|
|
break;
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
if (priv->ccd_type == 1)
|
|
|
|
val |= 0x01;
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
sanei_pa4s2_writebyte (dev->fd, 5, val);
|
|
|
|
|
|
|
|
sanei_pa4s2_writebyte (dev->fd, 6, 0x00);
|
|
|
|
|
|
|
|
DBG (5, "set_dpi_value: value 0x%02x\n", val);
|
2003-01-12 19:44:26 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2003-01-13 19:49:47 +00:00
|
|
|
static void
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
set_line_adjust (Mustek_pp_Handle * dev)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
int adjustline;
|
|
|
|
mustek_pp_ccd300_priv *priv = dev->priv;
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
adjustline = (dev->bottomX - dev->topX) * priv->hwres / 300;
|
|
|
|
priv->adjustskip = priv->adjustskip * priv->hwres / 300;
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
DBG (5, "set_line_adjust: ppl %u (%u), adjust %u, skip %u\n",
|
|
|
|
dev->params.pixels_per_line, (dev->bottomX - dev->topX), adjustline,
|
|
|
|
priv->adjustskip);
|
2003-01-12 19:44:26 +00:00
|
|
|
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
sanei_pa4s2_writebyte (dev->fd, 6, 0x11);
|
|
|
|
sanei_pa4s2_writebyte (dev->fd, 5, (adjustline + priv->adjustskip) >> 8);
|
|
|
|
sanei_pa4s2_writebyte (dev->fd, 6, 0x21);
|
|
|
|
sanei_pa4s2_writebyte (dev->fd, 5, (adjustline + priv->adjustskip) & 0xFF);
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
sanei_pa4s2_writebyte (dev->fd, 6, 0x01);
|
2003-01-12 19:44:26 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2003-01-13 19:49:47 +00:00
|
|
|
static void
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
set_lamp (Mustek_pp_Handle * dev, int lamp_on)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
|
|
|
int ctr;
|
|
|
|
mustek_pp_ccd300_priv *priv = dev->priv;
|
|
|
|
|
|
|
|
sanei_pa4s2_writebyte (dev->fd, 6, 0xC3);
|
|
|
|
|
|
|
|
for (ctr = 0; ctr < 3; ctr++)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
sanei_pa4s2_writebyte (dev->fd, 6, (lamp_on ? 0x47 : 0x57));
|
|
|
|
sanei_pa4s2_writebyte (dev->fd, 6, 0x77);
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
|
|
|
priv->motor_step = lamp_on;
|
|
|
|
|
|
|
|
set_led (dev);
|
|
|
|
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
|
|
|
|
2003-01-13 19:49:47 +00:00
|
|
|
static void
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
send_voltages (Mustek_pp_Handle * dev)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
|
|
|
int voltage, sel = 8, ctr;
|
|
|
|
mustek_pp_ccd300_priv *priv = dev->priv;
|
|
|
|
|
|
|
|
switch (priv->ccd_type)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
|
|
|
case 0:
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
voltage = 0;
|
2003-01-12 19:44:26 +00:00
|
|
|
break;
|
|
|
|
case 1:
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
voltage = 1;
|
2003-01-12 19:44:26 +00:00
|
|
|
break;
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
default:
|
|
|
|
voltage = 2;
|
2003-01-12 19:44:26 +00:00
|
|
|
break;
|
|
|
|
}
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
|
|
|
for (ctr = 0; ctr < 3; ctr++)
|
|
|
|
{
|
|
|
|
|
|
|
|
sel <<= 1;
|
|
|
|
sanei_pa4s2_writebyte (dev->fd, 6, sel);
|
|
|
|
sanei_pa4s2_writebyte (dev->fd, 5, voltages[voltage][ctr]);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
sanei_pa4s2_writebyte (dev->fd, 6, 0x00);
|
|
|
|
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
static int
|
|
|
|
compar (const void *a, const void *b)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
return (signed int) (*(const SANE_Byte *) a) -
|
|
|
|
(signed int) (*(const SANE_Byte *) b);
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
|
|
|
|
2003-01-13 19:49:47 +00:00
|
|
|
static void
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
set_ccd_channel_101x (Mustek_pp_Handle * dev, int channel)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
mustek_pp_ccd300_priv *priv = dev->priv;
|
|
|
|
switch (priv->asic)
|
|
|
|
{
|
|
|
|
case CCD300_ASIC1013:
|
|
|
|
set_ccd_channel_1013 (dev, channel);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case CCD300_ASIC1015:
|
|
|
|
set_ccd_channel_1015 (dev, channel);
|
|
|
|
break;
|
|
|
|
}
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
|
|
|
|
2003-01-13 19:49:47 +00:00
|
|
|
static void
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
motor_forward_101x (Mustek_pp_Handle * dev)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
mustek_pp_ccd300_priv *priv = dev->priv;
|
|
|
|
switch (priv->asic)
|
|
|
|
{
|
|
|
|
case CCD300_ASIC1013:
|
|
|
|
motor_forward_1013 (dev);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case CCD300_ASIC1015:
|
|
|
|
motor_forward_1015 (dev);
|
|
|
|
break;
|
|
|
|
}
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
|
|
|
|
2003-01-13 19:49:47 +00:00
|
|
|
static void
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
motor_backward_101x (Mustek_pp_Handle * dev)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
mustek_pp_ccd300_priv *priv = dev->priv;
|
|
|
|
switch (priv->asic)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
case CCD300_ASIC1013:
|
|
|
|
motor_backward_1013 (dev);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case CCD300_ASIC1015:
|
|
|
|
/* motor_backward_1015 (dev); */
|
|
|
|
break;
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-01-13 19:49:47 +00:00
|
|
|
static void
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
move_motor_101x (Mustek_pp_Handle * dev, int forward)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
mustek_pp_ccd300_priv *priv = dev->priv;
|
|
|
|
if (forward == SANE_TRUE)
|
|
|
|
motor_forward_101x (dev);
|
2003-01-12 19:44:26 +00:00
|
|
|
else
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
motor_backward_101x (dev);
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
wait_bank_change (dev, priv->bank_count, 1);
|
|
|
|
reset_bank_count (dev);
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
2003-01-13 19:49:47 +00:00
|
|
|
static void
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
config_ccd_101x (Mustek_pp_Handle * dev)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
mustek_pp_ccd300_priv *priv = dev->priv;
|
|
|
|
switch (priv->asic)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
case CCD300_ASIC1013:
|
|
|
|
config_ccd_1013 (dev);
|
|
|
|
break;
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
case CCD300_ASIC1015:
|
|
|
|
config_ccd_1015 (dev);
|
|
|
|
break;
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-01-13 19:49:47 +00:00
|
|
|
static void
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
read_line_101x (Mustek_pp_Handle * dev, SANE_Byte * buf, SANE_Int pixel,
|
|
|
|
SANE_Int RefBlack, SANE_Byte * calib, SANE_Int * gamma)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
SANE_Byte *cal = calib;
|
|
|
|
u_char color;
|
|
|
|
mustek_pp_ccd300_priv *priv = dev->priv;
|
|
|
|
int ctr, skips = priv->adjustskip + 1, cval;
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
if (pixel <= 0)
|
|
|
|
return;
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
sanei_pa4s2_readbegin (dev->fd, 1);
|
2003-01-12 19:44:26 +00:00
|
|
|
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
if (priv->hwres == dev->res)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
while (skips--)
|
|
|
|
sanei_pa4s2_readbyte (dev->fd, &color);
|
|
|
|
|
|
|
|
for (ctr = 0; ctr < pixel; ctr++)
|
|
|
|
{
|
|
|
|
|
|
|
|
sanei_pa4s2_readbyte (dev->fd, &color);
|
|
|
|
|
|
|
|
cval = color;
|
|
|
|
|
|
|
|
if (cval < RefBlack)
|
|
|
|
cval = 0;
|
|
|
|
else
|
|
|
|
cval -= RefBlack;
|
|
|
|
|
|
|
|
if (cal)
|
|
|
|
{
|
|
|
|
if (cval >= cal[ctr])
|
|
|
|
cval = 0xFF;
|
|
|
|
else
|
|
|
|
{
|
|
|
|
cval <<= 8;
|
|
|
|
cval /= (int) cal[ctr];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (gamma)
|
|
|
|
cval = gamma[cval];
|
|
|
|
|
|
|
|
buf[ctr] = cval;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2003-01-12 19:44:26 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
int pos = 0, bpos = 0;
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
while (skips--)
|
|
|
|
sanei_pa4s2_readbyte (dev->fd, &color);
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
ctr = 0;
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
do
|
|
|
|
{
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
sanei_pa4s2_readbyte (dev->fd, &color);
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
cval = color;
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
if (ctr < (pos >> SANE_FIXED_SCALE_SHIFT))
|
|
|
|
{
|
|
|
|
ctr++;
|
|
|
|
continue;
|
|
|
|
}
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
ctr++;
|
|
|
|
pos += priv->res_step;
|
2003-01-12 19:44:26 +00:00
|
|
|
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
if (cval < RefBlack)
|
|
|
|
cval = 0;
|
|
|
|
else
|
|
|
|
cval -= RefBlack;
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
if (cal)
|
|
|
|
{
|
|
|
|
if (cval >= cal[bpos])
|
|
|
|
cval = 0xFF;
|
|
|
|
else
|
|
|
|
{
|
|
|
|
cval <<= 8;
|
|
|
|
cval /= (int) cal[bpos];
|
|
|
|
}
|
|
|
|
}
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
if (gamma)
|
|
|
|
cval = gamma[cval];
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
buf[bpos++] = cval;
|
|
|
|
|
|
|
|
}
|
|
|
|
while (bpos < pixel);
|
2003-01-12 19:44:26 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
sanei_pa4s2_readend (dev->fd);
|
2003-01-12 19:44:26 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
static void
|
|
|
|
read_average_line_101x (Mustek_pp_Handle * dev, SANE_Byte * buf, int pixel,
|
|
|
|
int RefBlack)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
|
|
|
SANE_Byte lbuf[4][CCD300_MAXHSIZE * 2];
|
|
|
|
int ctr, sum;
|
|
|
|
mustek_pp_ccd300_priv *priv = dev->priv;
|
|
|
|
|
|
|
|
for (ctr = 0; ctr < 4; ctr++)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
|
|
|
wait_bank_change (dev, priv->bank_count, 1);
|
|
|
|
read_line_101x (dev, lbuf[ctr], pixel, RefBlack, NULL, NULL);
|
|
|
|
reset_bank_count (dev);
|
|
|
|
if (ctr < 3)
|
|
|
|
set_sti (dev);
|
|
|
|
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
|
|
|
for (ctr = 0; ctr < pixel; ctr++)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
|
|
|
sum = lbuf[0][ctr] + lbuf[1][ctr] + lbuf[2][ctr] + lbuf[3][ctr];
|
|
|
|
|
|
|
|
buf[ctr] = (sum / 4);
|
|
|
|
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
static void
|
|
|
|
find_black_side_edge_101x (Mustek_pp_Handle * dev)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
SANE_Byte buf[CCD300_MAXHSIZE * 2];
|
|
|
|
SANE_Byte blackposition[5];
|
|
|
|
int pos = 0, ctr, blackpos;
|
|
|
|
mustek_pp_ccd300_priv *priv = dev->priv;
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
|
|
|
for (ctr = 0; ctr < 20; ctr++)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
|
|
|
motor_forward_101x (dev);
|
|
|
|
wait_bank_change (dev, priv->bank_count, 1);
|
|
|
|
read_line_101x (dev, buf, CCD300_MAXHSIZE, 0, NULL, NULL);
|
|
|
|
reset_bank_count (dev);
|
|
|
|
|
|
|
|
priv->ref_black = priv->ref_red = priv->ref_green = priv->ref_blue =
|
|
|
|
buf[0];
|
|
|
|
|
|
|
|
blackpos = CCD300_MAXHSIZE / 4;
|
|
|
|
|
|
|
|
while ((abs (buf[blackpos] - buf[0]) >= 15) && (blackpos > 0))
|
|
|
|
blackpos--;
|
|
|
|
|
|
|
|
if (blackpos > 1)
|
|
|
|
blackposition[pos++] = blackpos;
|
|
|
|
|
|
|
|
if (pos == 5)
|
2003-01-12 19:44:26 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
blackpos = 0;
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
for (ctr = 0; ctr < pos; ctr++)
|
|
|
|
if (blackposition[ctr] > blackpos)
|
|
|
|
blackpos = blackposition[ctr];
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
if (blackpos < 0x66)
|
|
|
|
blackpos = 0x6A;
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
priv->blackpos = blackpos;
|
|
|
|
priv->saved_skipcount = (blackpos + 12) & 0xFF;
|
2003-01-12 19:44:26 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
static void
|
|
|
|
min_color_levels_101x (Mustek_pp_Handle * dev)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
SANE_Byte buf[CCD300_MAXHSIZE * 2];
|
|
|
|
int ctr, sum = 0;
|
|
|
|
mustek_pp_ccd300_priv *priv = dev->priv;
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
for (ctr = 0; ctr < 8; ctr++)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
|
|
|
set_ccd_channel_101x (dev, CCD300_CHANNEL_RED);
|
|
|
|
set_sti (dev);
|
|
|
|
wait_bank_change (dev, priv->bank_count, 1);
|
|
|
|
|
|
|
|
read_line_101x (dev, buf, CCD300_MAXHSIZE, 0, NULL, NULL);
|
|
|
|
|
|
|
|
reset_bank_count (dev);
|
|
|
|
|
|
|
|
sum += buf[3];
|
|
|
|
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
|
|
|
priv->ref_red = sum / 8;
|
|
|
|
|
|
|
|
sum = 0;
|
|
|
|
|
|
|
|
for (ctr = 0; ctr < 8; ctr++)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
|
|
|
set_ccd_channel_101x (dev, CCD300_CHANNEL_GREEN);
|
|
|
|
set_sti (dev);
|
2003-11-24 11:25:17 +00:00
|
|
|
wait_bank_change (dev, priv->bank_count, 1);
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
|
|
|
read_line_101x (dev, buf, CCD300_MAXHSIZE, 0, NULL, NULL);
|
|
|
|
|
|
|
|
reset_bank_count (dev);
|
|
|
|
|
|
|
|
sum += buf[3];
|
|
|
|
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
priv->ref_green = sum / 8;
|
|
|
|
|
|
|
|
sum = 0;
|
|
|
|
|
|
|
|
for (ctr = 0; ctr < 8; ctr++)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
|
|
|
set_ccd_channel_101x (dev, CCD300_CHANNEL_BLUE);
|
|
|
|
set_sti (dev);
|
|
|
|
wait_bank_change (dev, priv->bank_count, 1);
|
|
|
|
|
|
|
|
read_line_101x (dev, buf, CCD300_MAXHSIZE, 0, NULL, NULL);
|
|
|
|
|
|
|
|
reset_bank_count (dev);
|
|
|
|
|
|
|
|
sum += buf[3];
|
|
|
|
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
|
|
|
priv->ref_blue = sum / 8;
|
|
|
|
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
|
|
|
static void
|
|
|
|
max_color_levels_101x (Mustek_pp_Handle * dev)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
|
|
|
int ctr, line, sum;
|
|
|
|
SANE_Byte rbuf[32][CCD300_MAXHSIZE * 2];
|
|
|
|
SANE_Byte gbuf[32][CCD300_MAXHSIZE * 2];
|
|
|
|
SANE_Byte bbuf[32][CCD300_MAXHSIZE * 2];
|
|
|
|
mustek_pp_ccd300_priv *priv = dev->priv;
|
|
|
|
|
|
|
|
SANE_Byte maxbuf[32];
|
|
|
|
|
|
|
|
for (ctr = 0; ctr < 32; ctr++)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
if (dev->mode == MODE_COLOR)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
|
|
|
set_ccd_channel_101x (dev, CCD300_CHANNEL_RED);
|
|
|
|
motor_forward_101x (dev);
|
|
|
|
|
|
|
|
read_average_line_101x (dev, rbuf[ctr], dev->params.pixels_per_line,
|
|
|
|
priv->ref_red);
|
|
|
|
|
|
|
|
set_ccd_channel_101x (dev, CCD300_CHANNEL_GREEN);
|
|
|
|
set_sti (dev);
|
|
|
|
|
|
|
|
read_average_line_101x (dev, gbuf[ctr], dev->params.pixels_per_line,
|
|
|
|
priv->ref_green);
|
|
|
|
|
|
|
|
set_ccd_channel_101x (dev, CCD300_CHANNEL_BLUE);
|
|
|
|
set_sti (dev);
|
|
|
|
|
|
|
|
read_average_line_101x (dev, bbuf[ctr], dev->params.pixels_per_line,
|
|
|
|
priv->ref_blue);
|
|
|
|
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
|
|
|
priv->channel = CCD300_CHANNEL_GRAY;
|
|
|
|
|
|
|
|
motor_forward_101x (dev);
|
|
|
|
|
|
|
|
read_average_line_101x (dev, gbuf[ctr], dev->params.pixels_per_line,
|
|
|
|
priv->ref_black);
|
|
|
|
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
|
|
|
for (ctr = 0; ctr < dev->params.pixels_per_line; ctr++)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
for (line = 0; line < 32; line++)
|
|
|
|
maxbuf[line] = gbuf[line][ctr];
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
qsort (maxbuf, 32, sizeof (maxbuf[0]), compar);
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
sum = maxbuf[4] + maxbuf[5] + maxbuf[6] + maxbuf[7];
|
|
|
|
|
|
|
|
priv->calib_g[ctr] = sum / 4;
|
2003-01-12 19:44:26 +00:00
|
|
|
|
|
|
|
}
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
|
|
|
if (dev->mode == MODE_COLOR)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
|
|
|
for (ctr = 0; ctr < dev->params.pixels_per_line; ctr++)
|
|
|
|
{
|
|
|
|
for (line = 0; line < 32; line++)
|
|
|
|
maxbuf[line] = rbuf[line][ctr];
|
|
|
|
|
|
|
|
qsort (maxbuf, 32, sizeof (maxbuf[0]), compar);
|
|
|
|
|
|
|
|
sum = maxbuf[4] + maxbuf[5] + maxbuf[6] + maxbuf[7];
|
|
|
|
|
|
|
|
priv->calib_r[ctr] = sum / 4;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
for (ctr = 0; ctr < dev->params.pixels_per_line; ctr++)
|
|
|
|
{
|
|
|
|
for (line = 0; line < 32; line++)
|
|
|
|
maxbuf[line] = bbuf[line][ctr];
|
|
|
|
|
|
|
|
qsort (maxbuf, 32, sizeof (maxbuf[0]), compar);
|
|
|
|
|
|
|
|
sum = maxbuf[4] + maxbuf[5] + maxbuf[6] + maxbuf[7];
|
|
|
|
|
|
|
|
priv->calib_b[ctr] = sum / 4;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
static void
|
|
|
|
find_black_top_edge_101x (Mustek_pp_Handle * dev)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
int lines = 0, ctr, pos;
|
|
|
|
SANE_Byte buf[CCD300_MAXHSIZE * 2];
|
|
|
|
mustek_pp_ccd300_priv *priv = dev->priv;
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
priv->channel = CCD300_CHANNEL_GRAY;
|
|
|
|
|
|
|
|
do
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
|
|
|
motor_forward_101x (dev);
|
|
|
|
wait_bank_change (dev, priv->bank_count, 1);
|
|
|
|
|
|
|
|
read_line_101x (dev, buf, CCD300_MAXHSIZE, priv->ref_black, NULL, NULL);
|
|
|
|
|
|
|
|
reset_bank_count (dev);
|
|
|
|
|
|
|
|
pos = 0;
|
|
|
|
|
|
|
|
for (ctr = priv->blackpos; ctr > priv->blackpos - 10; ctr--)
|
|
|
|
if (buf[ctr] <= 15)
|
|
|
|
pos++;
|
|
|
|
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
while ((pos >= 8) && (lines++ < 67));
|
2003-01-12 19:44:26 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
static void
|
|
|
|
calibrate_device_101x (Mustek_pp_Handle * dev)
|
|
|
|
{
|
|
|
|
|
|
|
|
int saved_ppl = dev->params.pixels_per_line, ctr;
|
|
|
|
mustek_pp_ccd300_priv *priv = dev->priv;
|
|
|
|
|
|
|
|
priv->saved_mode = dev->mode;
|
|
|
|
priv->saved_invert = dev->invert;
|
|
|
|
priv->saved_skipcount = priv->skipcount;
|
|
|
|
priv->saved_skipimagebyte = priv->skipimagebytes;
|
|
|
|
priv->saved_adjustskip = priv->adjustskip;
|
|
|
|
priv->saved_res = dev->res;
|
|
|
|
priv->saved_hwres = priv->hwres;
|
|
|
|
priv->saved_res_step = priv->res_step;
|
|
|
|
priv->saved_line_step = priv->line_step;
|
|
|
|
priv->saved_channel = priv->channel;
|
|
|
|
|
|
|
|
dev->params.pixels_per_line = CCD300_MAXHSIZE;
|
|
|
|
priv->hwres = dev->res = 300;
|
|
|
|
dev->mode = MODE_GRAYSCALE;
|
|
|
|
priv->skipcount = priv->skipimagebytes = 0;
|
|
|
|
dev->invert = SANE_FALSE;
|
|
|
|
priv->channel = CCD300_CHANNEL_GRAY;
|
|
|
|
|
|
|
|
config_ccd_101x (dev);
|
|
|
|
get_bank_count (dev);
|
|
|
|
|
|
|
|
find_black_side_edge_101x (dev);
|
|
|
|
|
|
|
|
for (ctr = 0; ctr < 4; ctr++)
|
|
|
|
move_motor_101x (dev, SANE_TRUE);
|
|
|
|
|
|
|
|
dev->mode = priv->saved_mode;
|
|
|
|
dev->invert = priv->saved_invert;
|
|
|
|
priv->skipcount = priv->saved_skipcount;
|
|
|
|
priv->skipimagebytes = priv->saved_skipimagebyte;
|
|
|
|
priv->adjustskip = priv->saved_adjustskip;
|
|
|
|
dev->res = priv->saved_res;
|
|
|
|
priv->hwres = priv->saved_hwres;
|
|
|
|
priv->res_step = priv->saved_res_step;
|
|
|
|
priv->line_step = priv->saved_line_step;
|
|
|
|
priv->channel = priv->saved_channel;
|
|
|
|
|
|
|
|
priv->hwres = dev->res = 300;
|
|
|
|
priv->skipcount = priv->skipimagebytes = 0;
|
|
|
|
dev->invert = SANE_FALSE;
|
|
|
|
|
|
|
|
config_ccd_101x (dev);
|
|
|
|
get_bank_count (dev);
|
|
|
|
|
|
|
|
if ((dev->mode == MODE_COLOR) && (priv->ccd_type != 0))
|
|
|
|
min_color_levels_101x (dev);
|
|
|
|
|
|
|
|
dev->mode = priv->saved_mode;
|
|
|
|
dev->invert = priv->saved_invert;
|
|
|
|
priv->skipcount = priv->saved_skipcount;
|
|
|
|
priv->skipimagebytes = priv->saved_skipimagebyte;
|
|
|
|
priv->adjustskip = priv->saved_adjustskip;
|
|
|
|
dev->res = priv->saved_res;
|
|
|
|
priv->hwres = priv->saved_hwres;
|
|
|
|
priv->res_step = priv->saved_res_step;
|
|
|
|
priv->line_step = priv->saved_line_step;
|
|
|
|
priv->channel = priv->saved_channel;
|
|
|
|
|
|
|
|
dev->params.pixels_per_line = saved_ppl;
|
|
|
|
dev->invert = SANE_FALSE;
|
|
|
|
|
|
|
|
config_ccd_101x (dev);
|
|
|
|
get_bank_count (dev);
|
|
|
|
|
|
|
|
max_color_levels_101x (dev);
|
|
|
|
|
|
|
|
dev->params.pixels_per_line = CCD300_MAXHSIZE;
|
|
|
|
dev->mode = MODE_GRAYSCALE;
|
|
|
|
priv->hwres = dev->res = 300;
|
|
|
|
priv->skipcount = priv->skipimagebytes = 0;
|
|
|
|
dev->invert = SANE_FALSE;
|
|
|
|
|
|
|
|
config_ccd_101x (dev);
|
|
|
|
get_bank_count (dev);
|
|
|
|
|
|
|
|
find_black_top_edge_101x (dev);
|
|
|
|
|
|
|
|
dev->mode = priv->saved_mode;
|
|
|
|
dev->invert = priv->saved_invert;
|
|
|
|
priv->skipcount = priv->saved_skipcount;
|
|
|
|
priv->skipimagebytes = priv->saved_skipimagebyte;
|
|
|
|
priv->adjustskip = priv->saved_adjustskip;
|
|
|
|
dev->res = priv->saved_res;
|
|
|
|
priv->hwres = priv->saved_hwres;
|
|
|
|
priv->res_step = priv->saved_res_step;
|
|
|
|
priv->line_step = priv->saved_line_step;
|
|
|
|
priv->channel = priv->saved_channel;
|
|
|
|
|
|
|
|
dev->params.pixels_per_line = saved_ppl;
|
|
|
|
|
|
|
|
config_ccd_101x (dev);
|
|
|
|
get_bank_count (dev);
|
2003-01-12 19:44:26 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
static void
|
|
|
|
get_grayscale_line_101x (Mustek_pp_Handle * dev, SANE_Byte * buf)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
int skips;
|
|
|
|
mustek_pp_ccd300_priv *priv = dev->priv;
|
|
|
|
|
|
|
|
priv->line_diff += SANE_FIX (300.0 / (float) dev->res);
|
|
|
|
|
|
|
|
skips = (priv->line_diff >> SANE_FIXED_SCALE_SHIFT);
|
|
|
|
|
|
|
|
while (--skips)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
motor_forward_101x (dev);
|
2003-11-24 11:25:17 +00:00
|
|
|
wait_bank_change (dev, priv->bank_count, 1);
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
reset_bank_count (dev);
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
priv->line_diff &= 0xFFFF;
|
|
|
|
|
|
|
|
motor_forward_101x (dev);
|
|
|
|
wait_bank_change (dev, priv->bank_count, 1);
|
|
|
|
|
|
|
|
read_line_101x (dev, buf, dev->params.pixels_per_line, priv->ref_black,
|
|
|
|
priv->calib_g, NULL);
|
|
|
|
|
|
|
|
reset_bank_count (dev);
|
2003-01-12 19:44:26 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
static void
|
|
|
|
get_lineart_line_101x (Mustek_pp_Handle * dev, SANE_Byte * buf)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
|
|
|
int ctr;
|
|
|
|
SANE_Byte gbuf[CCD300_MAXHSIZE * 2];
|
|
|
|
mustek_pp_ccd300_priv *priv = dev->priv;
|
|
|
|
|
|
|
|
get_grayscale_line_101x (dev, gbuf);
|
|
|
|
|
|
|
|
memset (buf, 0xFF, dev->params.bytes_per_line);
|
|
|
|
|
|
|
|
for (ctr = 0; ctr < dev->params.pixels_per_line; ctr++)
|
|
|
|
buf[ctr >> 3] ^= ((gbuf[ctr] > priv->bw) ? (1 << (7 - ctr % 8)) : 0);
|
|
|
|
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
static void
|
|
|
|
get_color_line_101x (Mustek_pp_Handle * dev, SANE_Byte * buf)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
|
|
|
SANE_Byte *red, *blue, *src, *dest;
|
|
|
|
int gotline = 0, ctr;
|
|
|
|
int gored, goblue, gogreen;
|
|
|
|
mustek_pp_ccd300_priv *priv = dev->priv;
|
|
|
|
int step = priv->line_step;
|
|
|
|
|
|
|
|
do
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
|
|
|
red = priv->red[priv->redline];
|
|
|
|
blue = priv->blue[priv->blueline];
|
|
|
|
|
|
|
|
priv->ccd_line++;
|
|
|
|
|
|
|
|
if ((priv->rdiff >> SANE_FIXED_SCALE_SHIFT) == priv->ccd_line)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
gored = 1;
|
|
|
|
priv->rdiff += step;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
gored = 0;
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
if ((priv->bdiff >> SANE_FIXED_SCALE_SHIFT) == priv->ccd_line)
|
|
|
|
{
|
|
|
|
goblue = 1;
|
|
|
|
priv->bdiff += step;
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
else
|
|
|
|
goblue = 0;
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
if ((priv->gdiff >> SANE_FIXED_SCALE_SHIFT) == priv->ccd_line)
|
|
|
|
{
|
|
|
|
gogreen = 1;
|
|
|
|
priv->gdiff += step;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
gogreen = 0;
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
if (!gored && !goblue && !gogreen)
|
|
|
|
{
|
|
|
|
motor_forward_101x (dev);
|
|
|
|
wait_bank_change (dev, priv->bank_count, 1);
|
|
|
|
reset_bank_count (dev);
|
|
|
|
if (priv->ccd_line >= (priv->line_step >> SANE_FIXED_SCALE_SHIFT))
|
|
|
|
priv->redline = ++priv->redline % priv->green_offs;
|
|
|
|
if (priv->ccd_line >=
|
|
|
|
priv->blue_offs + (priv->line_step >> SANE_FIXED_SCALE_SHIFT))
|
|
|
|
priv->blueline = ++priv->blueline % priv->blue_offs;
|
|
|
|
continue;
|
|
|
|
}
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
if (gored)
|
|
|
|
priv->channel = CCD300_CHANNEL_RED;
|
|
|
|
else if (goblue)
|
|
|
|
priv->channel = CCD300_CHANNEL_BLUE;
|
|
|
|
else
|
|
|
|
priv->channel = CCD300_CHANNEL_GREEN;
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
motor_forward_101x (dev);
|
|
|
|
wait_bank_change (dev, priv->bank_count, 1);
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
if (priv->ccd_line >= priv->green_offs && gogreen)
|
|
|
|
{
|
|
|
|
src = red;
|
|
|
|
dest = buf;
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
for (ctr = 0; ctr < dev->params.pixels_per_line; ctr++)
|
|
|
|
{
|
|
|
|
*dest = *src++;
|
|
|
|
dest += 3;
|
|
|
|
}
|
|
|
|
}
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
if (gored)
|
|
|
|
{
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
read_line_101x (dev, red, dev->params.pixels_per_line,
|
|
|
|
priv->ref_red, priv->calib_r, NULL);
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
reset_bank_count (dev);
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
}
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
priv->redline = ++priv->redline % priv->green_offs;
|
|
|
|
|
|
|
|
if (priv->ccd_line >= priv->green_offs && gogreen)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
src = blue;
|
|
|
|
dest = buf + 2;
|
|
|
|
|
|
|
|
|
|
|
|
for (ctr = 0; ctr < dev->params.pixels_per_line; ctr++)
|
|
|
|
{
|
|
|
|
*dest = *src++;
|
|
|
|
dest += 3;
|
|
|
|
}
|
|
|
|
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
if (goblue)
|
|
|
|
{
|
|
|
|
if (gored)
|
|
|
|
{
|
|
|
|
set_ccd_channel_101x (dev, CCD300_CHANNEL_BLUE);
|
|
|
|
set_sti (dev);
|
|
|
|
wait_bank_change (dev, priv->bank_count, 1);
|
|
|
|
}
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
read_line_101x (dev, blue, dev->params.pixels_per_line,
|
|
|
|
priv->ref_blue, priv->calib_b, NULL);
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
reset_bank_count (dev);
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
}
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
if (priv->ccd_line >=
|
|
|
|
priv->blue_offs + (priv->line_step >> SANE_FIXED_SCALE_SHIFT))
|
|
|
|
priv->blueline = ++priv->blueline % priv->blue_offs;
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
if (gogreen)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
|
|
|
if (gored || goblue)
|
|
|
|
{
|
|
|
|
set_ccd_channel_101x (dev, CCD300_CHANNEL_GREEN);
|
|
|
|
set_sti (dev);
|
|
|
|
wait_bank_change (dev, priv->bank_count, 1);
|
|
|
|
}
|
|
|
|
|
|
|
|
read_line_101x (dev, priv->green, dev->params.pixels_per_line,
|
|
|
|
priv->ref_green, priv->calib_g, NULL);
|
|
|
|
|
|
|
|
reset_bank_count (dev);
|
|
|
|
|
|
|
|
src = priv->green;
|
|
|
|
dest = buf + 1;
|
|
|
|
|
|
|
|
for (ctr = 0; ctr < dev->params.pixels_per_line; ctr++)
|
|
|
|
{
|
|
|
|
*dest = *src++;
|
|
|
|
dest += 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
gotline = 1;
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
while (!gotline);
|
|
|
|
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* these functions are for the 1013 chipset */
|
|
|
|
|
2003-01-13 19:49:47 +00:00
|
|
|
static void
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
set_ccd_channel_1013 (Mustek_pp_Handle * dev, int channel)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
mustek_pp_ccd300_priv *priv = dev->priv;
|
|
|
|
priv->channel = channel;
|
|
|
|
sanei_pa4s2_writebyte (dev->fd, 6, chan_codes_1013[channel]);
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
|
|
|
|
2003-01-13 19:49:47 +00:00
|
|
|
static void
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
motor_backward_1013 (Mustek_pp_Handle * dev)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
mustek_pp_ccd300_priv *priv = dev->priv;
|
|
|
|
|
|
|
|
priv->motor_step++;
|
|
|
|
set_led (dev);
|
|
|
|
|
|
|
|
if (priv->motor_phase > 3)
|
|
|
|
priv->motor_phase = 3;
|
|
|
|
|
|
|
|
sanei_pa4s2_writebyte (dev->fd, 6, 0x62);
|
|
|
|
sanei_pa4s2_writebyte (dev->fd, 5, fullstep[priv->motor_phase]);
|
|
|
|
|
|
|
|
priv->motor_phase = (priv->motor_phase == 0 ? 3 : priv->motor_phase - 1);
|
|
|
|
|
|
|
|
set_ccd_channel_1013 (dev, priv->channel);
|
|
|
|
set_sti (dev);
|
2003-01-12 19:44:26 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2003-01-13 19:49:47 +00:00
|
|
|
static void
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
return_home_1013 (Mustek_pp_Handle * dev)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
u_char ishome;
|
|
|
|
int ctr;
|
|
|
|
mustek_pp_ccd300_priv *priv = dev->priv;
|
|
|
|
|
|
|
|
/* 1013 can't return home all alone, nowait ignored */
|
|
|
|
|
|
|
|
for (ctr = 0; ctr < 4500; ctr++)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
|
|
|
/* check_is_home_1013 */
|
|
|
|
sanei_pa4s2_readbegin (dev->fd, 2);
|
|
|
|
sanei_pa4s2_readbyte (dev->fd, &ishome);
|
|
|
|
sanei_pa4s2_readend (dev->fd);
|
|
|
|
|
|
|
|
/* yes, it should be is_not_home */
|
|
|
|
if ((ishome & 1) == 0)
|
2003-01-12 19:44:26 +00:00
|
|
|
break;
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
motor_backward_1013 (dev);
|
|
|
|
wait_bank_change (dev, priv->bank_count, 0);
|
|
|
|
reset_bank_count (dev);
|
2003-01-12 19:44:26 +00:00
|
|
|
|
|
|
|
}
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
|
|
|
|
2003-01-13 19:49:47 +00:00
|
|
|
static void
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
motor_forward_1013 (Mustek_pp_Handle * dev)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
int ctr;
|
|
|
|
mustek_pp_ccd300_priv *priv = dev->priv;
|
|
|
|
|
|
|
|
priv->motor_step++;
|
|
|
|
set_led (dev);
|
|
|
|
|
|
|
|
for (ctr = 0; ctr < 2; ctr++)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
|
|
|
sanei_pa4s2_writebyte (dev->fd, 6, 0x62);
|
|
|
|
sanei_pa4s2_writebyte (dev->fd, 5, halfstep[priv->motor_phase]);
|
|
|
|
|
|
|
|
priv->motor_phase =
|
|
|
|
(priv->motor_phase == 7 ? 0 : priv->motor_phase + 1);
|
|
|
|
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
|
|
|
set_ccd_channel_1013 (dev, priv->channel);
|
|
|
|
set_sti (dev);
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
|
|
|
|
2003-01-13 19:49:47 +00:00
|
|
|
static void
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
config_ccd_1013 (Mustek_pp_Handle * dev)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
mustek_pp_ccd300_priv *priv = dev->priv;
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
if (dev->res != 0)
|
|
|
|
priv->res_step = SANE_FIX ((float) priv->hwres / (float) dev->res);
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
set_dpi_value (dev);
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
/* set_start_channel_1013 (dev); */
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
sanei_pa4s2_writebyte (dev->fd, 6, 0x05);
|
|
|
|
|
|
|
|
switch (dev->mode)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
case MODE_BW:
|
|
|
|
case MODE_GRAYSCALE:
|
|
|
|
priv->channel = CCD300_CHANNEL_GRAY;
|
|
|
|
break;
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
case MODE_COLOR:
|
|
|
|
priv->channel = CCD300_CHANNEL_RED;
|
|
|
|
break;
|
2003-01-12 19:44:26 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
set_ccd_channel_1013 (dev, priv->channel);
|
|
|
|
|
|
|
|
/* set_invert_1013 (dev); */
|
|
|
|
|
|
|
|
sanei_pa4s2_writebyte (dev->fd, 6,
|
|
|
|
(dev->invert == SANE_TRUE ? 0x04 : 0x14));
|
|
|
|
|
|
|
|
sanei_pa4s2_writebyte (dev->fd, 6, 0x37);
|
|
|
|
reset_bank_count (dev);
|
|
|
|
|
|
|
|
sanei_pa4s2_writebyte (dev->fd, 6, 0x27);
|
|
|
|
sanei_pa4s2_writebyte (dev->fd, 6, 0x67);
|
|
|
|
sanei_pa4s2_writebyte (dev->fd, 6, 0x17);
|
|
|
|
sanei_pa4s2_writebyte (dev->fd, 6, 0x77);
|
|
|
|
|
|
|
|
/* set_initial_skip_1013 (dev); */
|
|
|
|
|
|
|
|
sanei_pa4s2_writebyte (dev->fd, 6, 0x41);
|
|
|
|
|
|
|
|
priv->adjustskip = priv->skipcount + priv->skipimagebytes;
|
|
|
|
|
|
|
|
DBG (5, "config_ccd_1013: adjustskip %u\n", priv->adjustskip);
|
|
|
|
|
|
|
|
sanei_pa4s2_writebyte (dev->fd, 5, priv->adjustskip / 16 + 2);
|
|
|
|
|
|
|
|
priv->adjustskip %= 16;
|
|
|
|
|
|
|
|
sanei_pa4s2_writebyte (dev->fd, 6, 0x81);
|
|
|
|
sanei_pa4s2_writebyte (dev->fd, 5, 0x70);
|
|
|
|
sanei_pa4s2_writebyte (dev->fd, 6, 0x01);
|
|
|
|
|
|
|
|
|
|
|
|
set_line_adjust (dev);
|
|
|
|
|
|
|
|
get_bank_count (dev);
|
2003-01-12 19:44:26 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
/* these functions are for the 1015 chipset */
|
|
|
|
|
|
|
|
|
2003-01-13 19:49:47 +00:00
|
|
|
static void
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
motor_control_1015 (Mustek_pp_Handle * dev, u_char control)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
u_char val;
|
|
|
|
|
|
|
|
DBG (5, "motor_controll_1015: control code 0x%02x\n",
|
|
|
|
(unsigned int) control);
|
|
|
|
|
|
|
|
sanei_pa4s2_writebyte (dev->fd, 6, 0xF6);
|
|
|
|
sanei_pa4s2_writebyte (dev->fd, 6, 0x22);
|
|
|
|
sanei_pa4s2_writebyte (dev->fd, 5, control);
|
|
|
|
sanei_pa4s2_writebyte (dev->fd, 6, 0x02);
|
|
|
|
|
|
|
|
do
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
|
|
|
sanei_pa4s2_readbegin (dev->fd, 2);
|
|
|
|
sanei_pa4s2_readbyte (dev->fd, &val);
|
|
|
|
sanei_pa4s2_readend (dev->fd);
|
|
|
|
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
while ((val & 0x08) != 0);
|
|
|
|
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
|
|
|
|
2003-01-13 19:49:47 +00:00
|
|
|
static void
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
return_home_1015 (Mustek_pp_Handle * dev, SANE_Bool nowait)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
|
|
|
u_char ishome, control = 0xC3;
|
|
|
|
|
|
|
|
motor_control_1015 (dev, control);
|
|
|
|
|
|
|
|
do
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
|
|
|
/* check_is_home_1015 */
|
|
|
|
sanei_pa4s2_readbegin (dev->fd, 2);
|
|
|
|
sanei_pa4s2_readbyte (dev->fd, &ishome);
|
|
|
|
sanei_pa4s2_readend (dev->fd);
|
|
|
|
|
|
|
|
if (nowait)
|
|
|
|
break;
|
|
|
|
|
|
|
|
usleep (1000); /* much nicer load */
|
|
|
|
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
while ((ishome & 2) == 0);
|
|
|
|
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
|
|
|
|
2003-01-13 19:49:47 +00:00
|
|
|
static void
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
motor_forward_1015 (Mustek_pp_Handle * dev)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
u_char control = 0x1B;
|
|
|
|
mustek_pp_ccd300_priv *priv = dev->priv;
|
|
|
|
|
|
|
|
priv->motor_step++;
|
|
|
|
set_led (dev);
|
|
|
|
|
|
|
|
|
|
|
|
motor_control_1015 (dev, control);
|
|
|
|
|
|
|
|
set_ccd_channel_1015 (dev, priv->channel);
|
|
|
|
set_sti (dev);
|
|
|
|
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
/*
|
2003-01-13 19:49:47 +00:00
|
|
|
static void
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
motor_backward_1015 (Mustek_pp_Handle * dev)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
u_char control = 0x43;
|
|
|
|
mustek_pp_ccd300_priv *priv = dev->priv;
|
|
|
|
|
|
|
|
priv->motor_step++;
|
|
|
|
|
|
|
|
set_led (dev);
|
|
|
|
|
|
|
|
switch (priv->ccd_type)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
|
|
|
case 1:
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
control = 0x1B;
|
2003-01-12 19:44:26 +00:00
|
|
|
break;
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
|
|
|
default:
|
|
|
|
control = 0x43;
|
2003-01-12 19:44:26 +00:00
|
|
|
break;
|
|
|
|
}
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
|
|
|
motor_control_1015 (dev, control);
|
|
|
|
|
|
|
|
set_ccd_channel_1015 (dev, priv->channel);
|
|
|
|
set_sti (dev);
|
|
|
|
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
*/
|
|
|
|
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-01-13 19:49:47 +00:00
|
|
|
static void
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
set_ccd_channel_1015 (Mustek_pp_Handle * dev, int channel)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
|
|
|
u_char chancode = chan_codes_1015[channel];
|
|
|
|
mustek_pp_ccd300_priv *priv = dev->priv;
|
|
|
|
|
|
|
|
priv->channel = channel;
|
|
|
|
|
|
|
|
priv->image_control &= 0x34;
|
|
|
|
chancode |= priv->image_control;
|
|
|
|
|
|
|
|
|
|
|
|
priv->image_control = chancode;
|
|
|
|
|
|
|
|
sanei_pa4s2_writebyte (dev->fd, 6, chancode);
|
|
|
|
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
2003-01-13 19:49:47 +00:00
|
|
|
static void
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
config_ccd_1015 (Mustek_pp_Handle * dev)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
|
|
|
u_char val;
|
|
|
|
mustek_pp_ccd300_priv *priv = dev->priv;
|
|
|
|
|
|
|
|
if (dev->res != 0)
|
|
|
|
priv->res_step = SANE_FIX ((float) priv->hwres / (float) dev->res);
|
|
|
|
|
|
|
|
|
|
|
|
set_dpi_value (dev);
|
|
|
|
|
|
|
|
priv->image_control = 4;
|
|
|
|
|
|
|
|
/* set_start_channel_1015 (dev); */
|
|
|
|
|
|
|
|
switch (dev->mode)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
case MODE_BW:
|
|
|
|
case MODE_GRAYSCALE:
|
|
|
|
priv->channel = CCD300_CHANNEL_GRAY;
|
2003-01-12 19:44:26 +00:00
|
|
|
break;
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
|
|
|
case MODE_COLOR:
|
|
|
|
priv->channel = CCD300_CHANNEL_RED;
|
2003-01-12 19:44:26 +00:00
|
|
|
break;
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
set_ccd_channel_1015 (dev, priv->channel);
|
2003-01-12 19:44:26 +00:00
|
|
|
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
/* set_invert_1015 (dev); */
|
|
|
|
|
|
|
|
priv->image_control &= 0xE4;
|
|
|
|
|
|
|
|
if (dev->invert == SANE_FALSE)
|
|
|
|
priv->image_control |= 0x10;
|
|
|
|
|
|
|
|
|
|
|
|
sanei_pa4s2_writebyte (dev->fd, 6, priv->image_control);
|
|
|
|
|
|
|
|
sanei_pa4s2_writebyte (dev->fd, 6, 0x23);
|
|
|
|
sanei_pa4s2_writebyte (dev->fd, 5, 0x00);
|
|
|
|
|
|
|
|
sanei_pa4s2_writebyte (dev->fd, 6, 0x43);
|
|
|
|
|
|
|
|
switch (priv->ccd_type)
|
|
|
|
{
|
|
|
|
case 1:
|
|
|
|
val = 0x6B;
|
2003-01-12 19:44:26 +00:00
|
|
|
break;
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
case 4:
|
|
|
|
val = 0x9F;
|
2003-01-12 19:44:26 +00:00
|
|
|
break;
|
|
|
|
default:
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
val = 0x92;
|
2003-01-12 19:44:26 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
sanei_pa4s2_writebyte (dev->fd, 5, val);
|
|
|
|
sanei_pa4s2_writebyte (dev->fd, 6, 0x03);
|
|
|
|
|
|
|
|
sanei_pa4s2_writebyte (dev->fd, 6, 0x37);
|
|
|
|
reset_bank_count (dev);
|
|
|
|
|
|
|
|
sanei_pa4s2_writebyte (dev->fd, 6, 0x27);
|
|
|
|
sanei_pa4s2_writebyte (dev->fd, 6, 0x67);
|
|
|
|
sanei_pa4s2_writebyte (dev->fd, 6, 0x17);
|
|
|
|
sanei_pa4s2_writebyte (dev->fd, 6, 0x77);
|
|
|
|
|
|
|
|
/* set_initial_skip_1015 (dev); */
|
|
|
|
|
|
|
|
sanei_pa4s2_writebyte (dev->fd, 6, 0x41);
|
|
|
|
|
|
|
|
priv->adjustskip = priv->skipcount + priv->skipimagebytes;
|
|
|
|
|
|
|
|
/* if (dev->CCD.mode == MODE_COLOR)
|
|
|
|
dev->CCD.adjustskip <<= 3; */
|
|
|
|
|
|
|
|
|
|
|
|
sanei_pa4s2_writebyte (dev->fd, 5, priv->adjustskip / 32 + 1);
|
|
|
|
|
|
|
|
priv->adjustskip %= 32;
|
|
|
|
|
|
|
|
|
|
|
|
sanei_pa4s2_writebyte (dev->fd, 6, 0x81);
|
|
|
|
|
|
|
|
/* expose time */
|
|
|
|
switch (priv->ccd_type)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
|
|
|
case 1:
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
val = 0xA8;
|
2003-01-12 19:44:26 +00:00
|
|
|
break;
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
case 0:
|
|
|
|
val = 0x8A;
|
2003-01-12 19:44:26 +00:00
|
|
|
break;
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
default:
|
|
|
|
val = 0xA8;
|
2003-01-12 19:44:26 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
sanei_pa4s2_writebyte (dev->fd, 5, val);
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
sanei_pa4s2_writebyte (dev->fd, 6, 0x01);
|
|
|
|
|
|
|
|
|
|
|
|
set_line_adjust (dev);
|
|
|
|
|
|
|
|
get_bank_count (dev);
|
2003-01-12 19:44:26 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
|
|
|
/* these functions are interfaces only */
|
2003-01-13 19:49:47 +00:00
|
|
|
static void
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
config_ccd (Mustek_pp_Handle * dev)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
mustek_pp_ccd300_priv *priv = dev->priv;
|
|
|
|
|
|
|
|
DBG (5, "config_ccd: %d dpi, mode %d, invert %d, size %d\n",
|
|
|
|
priv->hwres, dev->mode, dev->invert, dev->params.pixels_per_line);
|
|
|
|
|
|
|
|
switch (priv->asic)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
case CCD300_ASIC1013:
|
|
|
|
config_ccd_1013 (dev);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case CCD300_ASIC1015:
|
|
|
|
config_ccd_1015 (dev);
|
|
|
|
break;
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2003-01-13 19:49:47 +00:00
|
|
|
static void
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
return_home (Mustek_pp_Handle * dev, SANE_Bool nowait)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
mustek_pp_ccd300_priv *priv = dev->priv;
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
priv->saved_mode = dev->mode;
|
|
|
|
priv->saved_invert = dev->invert;
|
|
|
|
priv->saved_skipcount = priv->skipcount;
|
|
|
|
priv->saved_skipimagebyte = priv->skipimagebytes;
|
|
|
|
priv->saved_adjustskip = priv->adjustskip;
|
|
|
|
priv->saved_res = dev->res;
|
|
|
|
priv->saved_hwres = priv->hwres;
|
|
|
|
priv->saved_res_step = priv->res_step;
|
|
|
|
priv->saved_line_step = priv->line_step;
|
|
|
|
priv->saved_channel = priv->channel;
|
2003-01-12 19:44:26 +00:00
|
|
|
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
priv->hwres = dev->res = 100;
|
|
|
|
dev->mode = MODE_GRAYSCALE;
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
priv->skipcount = priv->skipimagebytes = 0;
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
config_ccd (dev);
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
switch (priv->asic)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
case CCD300_ASIC1013:
|
|
|
|
return_home_1013 (dev);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case CCD300_ASIC1015:
|
|
|
|
return_home_1015 (dev, nowait);
|
|
|
|
break;
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
|
|
|
dev->mode = priv->saved_mode;
|
|
|
|
dev->invert = priv->saved_invert;
|
|
|
|
priv->skipcount = priv->saved_skipcount;
|
|
|
|
priv->skipimagebytes = priv->saved_skipimagebyte;
|
|
|
|
priv->adjustskip = priv->saved_adjustskip;
|
|
|
|
dev->res = priv->saved_res;
|
|
|
|
priv->hwres = priv->saved_hwres;
|
|
|
|
priv->res_step = priv->saved_res_step;
|
|
|
|
priv->line_step = priv->saved_line_step;
|
|
|
|
priv->channel = priv->saved_channel;
|
|
|
|
priv->motor_step = 0;
|
|
|
|
|
|
|
|
config_ccd (dev);
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
static void
|
|
|
|
lamp (Mustek_pp_Handle * dev, int lamp_on)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
set_lamp (dev, lamp_on);
|
|
|
|
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
|
|
|
|
2003-01-13 19:49:47 +00:00
|
|
|
static void
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
set_voltages (Mustek_pp_Handle * dev)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
send_voltages (dev);
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
|
|
|
|
2003-01-13 19:49:47 +00:00
|
|
|
static void
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
move_motor (Mustek_pp_Handle * dev, int count, int forward)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
|
|
|
int ctr;
|
|
|
|
|
|
|
|
DBG (5, "move_motor: %u steps (%s)\n", count,
|
|
|
|
(forward == SANE_TRUE ? "forward" : "backward"));
|
|
|
|
|
|
|
|
|
|
|
|
for (ctr = 0; ctr < count; ctr++)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
|
|
|
move_motor_101x (dev, forward);
|
|
|
|
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
|
|
|
|
2003-01-13 19:49:47 +00:00
|
|
|
static void
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
calibrate (Mustek_pp_Handle * dev)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
mustek_pp_ccd300_priv *priv = dev->priv;
|
|
|
|
|
|
|
|
DBG (5, "calibrate entered (asic = 0x%02x)\n", priv->asic);
|
|
|
|
|
|
|
|
calibrate_device_101x (dev);
|
|
|
|
|
|
|
|
DBG (5, "calibrate: ref_black %d, blackpos %d\n",
|
|
|
|
priv->ref_black, priv->blackpos);
|
|
|
|
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
2003-01-13 19:49:47 +00:00
|
|
|
static void
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
get_lineart_line (Mustek_pp_Handle * dev, SANE_Byte * buf)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
get_lineart_line_101x (dev, buf);
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
|
|
|
|
2003-01-13 19:49:47 +00:00
|
|
|
static void
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
get_grayscale_line (Mustek_pp_Handle * dev, SANE_Byte * buf)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
|
|
|
|
get_grayscale_line_101x (dev, buf);
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
|
|
|
|
2003-01-13 19:49:47 +00:00
|
|
|
static void
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
get_color_line (Mustek_pp_Handle * dev, SANE_Byte * buf)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
get_color_line_101x (dev, buf);
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
}
|
2003-01-12 19:44:26 +00:00
|
|
|
|
|
|
|
|
2003-01-13 19:49:47 +00:00
|
|
|
static SANE_Status
|
2003-01-12 19:44:26 +00:00
|
|
|
ccd300_init (SANE_Int options, SANE_String_Const port,
|
|
|
|
SANE_String_Const name, SANE_Attach_Callback attach)
|
|
|
|
{
|
|
|
|
SANE_Status status;
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
unsigned char asic, ccd;
|
|
|
|
int fd;
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
if (options != CAP_NOTHING)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
DBG (1, "ccd300_init: called with unknown options (%#02x)\n", options);
|
2003-01-12 19:44:26 +00:00
|
|
|
return SANE_STATUS_INVAL;
|
|
|
|
}
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
/* try to attach to he supplied port */
|
|
|
|
status = sanei_pa4s2_open (port, &fd);
|
2003-01-12 19:44:26 +00:00
|
|
|
|
|
|
|
if (status != SANE_STATUS_GOOD)
|
|
|
|
{
|
|
|
|
DBG (2, "ccd300_init: couldn't attach to port ``%s'' (%s)\n",
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
port, sane_strstatus (status));
|
2003-01-12 19:44:26 +00:00
|
|
|
return status;
|
|
|
|
}
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
sanei_pa4s2_enable (fd, SANE_TRUE);
|
|
|
|
sanei_pa4s2_readbegin (fd, 0);
|
|
|
|
sanei_pa4s2_readbyte (fd, &asic);
|
|
|
|
sanei_pa4s2_readend (fd);
|
|
|
|
sanei_pa4s2_readbegin (fd, 2);
|
|
|
|
sanei_pa4s2_readbyte (fd, &ccd);
|
|
|
|
sanei_pa4s2_readend (fd);
|
|
|
|
sanei_pa4s2_enable (fd, SANE_FALSE);
|
|
|
|
sanei_pa4s2_close (fd);
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
if (asic != CCD300_ASIC1013 && asic != CCD300_ASIC1015)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
DBG (2, "ccd300_init: scanner not recognized (unknown ASIC id %#02x)\n",
|
|
|
|
asic);
|
|
|
|
return SANE_STATUS_INVAL;
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
ccd &= (asic == CCD300_ASIC1013 ? 0x04 : 0x05);
|
|
|
|
|
|
|
|
DBG (3, "ccd_init: found scanner on port ``%s'' (ASIC id %#02x, CCD %d)\n",
|
|
|
|
port, asic, ccd);
|
2003-01-12 19:44:26 +00:00
|
|
|
|
|
|
|
return attach (port, name, MUSTEK_PP_CCD300, options);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2003-01-13 19:49:47 +00:00
|
|
|
static void
|
2003-01-12 19:44:26 +00:00
|
|
|
ccd300_capabilities (SANE_Int info, SANE_String * model,
|
|
|
|
SANE_String * vendor, SANE_String * type,
|
|
|
|
SANE_Int * maxres, SANE_Int * minres,
|
|
|
|
SANE_Int * maxhsize, SANE_Int * maxvsize,
|
|
|
|
SANE_Int * caps)
|
|
|
|
{
|
|
|
|
*model = strdup ("600 III EP Plus");
|
|
|
|
*vendor = strdup ("Mustek");
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
*type = strdup ("flatbed (CCD 300 dpi)");
|
|
|
|
DBG (3,
|
|
|
|
"ccd300_capabilities: 600 III EP Plus flatbed CCD (300 dpi) scanner\n");
|
|
|
|
|
2003-01-12 19:44:26 +00:00
|
|
|
*maxres = 300;
|
|
|
|
*minres = 50;
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
*maxhsize = CCD300_MAXHSIZE;
|
|
|
|
*maxvsize = CCD300_MAXVSIZE;
|
2003-01-12 19:44:26 +00:00
|
|
|
*caps = info | CAP_INVERT | CAP_LAMP_OFF;
|
|
|
|
}
|
|
|
|
|
2003-01-13 19:49:47 +00:00
|
|
|
static SANE_Status
|
2003-01-12 19:44:26 +00:00
|
|
|
ccd300_open (SANE_String port, SANE_Int caps, SANE_Int * fd)
|
|
|
|
{
|
|
|
|
SANE_Status status;
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
if (caps & ~(CAP_NOTHING | CAP_INVERT | CAP_LAMP_OFF))
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
DBG (1, "ccd300_open: called with unknonw capabilities (%#02x)\n",
|
2003-01-12 19:44:26 +00:00
|
|
|
caps);
|
|
|
|
return SANE_STATUS_INVAL;
|
|
|
|
}
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
DBG (3, "ccd300_open: called for port ``%s''\n", port);
|
2003-01-12 19:44:26 +00:00
|
|
|
|
|
|
|
status = sanei_pa4s2_open (port, fd);
|
|
|
|
|
|
|
|
if (status != SANE_STATUS_GOOD)
|
|
|
|
DBG (2, "ccd300_open: open failed (%s)\n", sane_strstatus (status));
|
|
|
|
|
|
|
|
return status;
|
|
|
|
}
|
|
|
|
|
2003-01-13 19:49:47 +00:00
|
|
|
static void
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
ccd300_setup (SANE_Handle handle)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
Mustek_pp_Handle *dev = handle;
|
|
|
|
mustek_pp_ccd300_priv *priv;
|
|
|
|
unsigned char asic, ccd;
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
DBG (3, "ccd300_setup: called for port ``%s''\n", dev->dev->port);
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
if ((priv = malloc (sizeof (mustek_pp_ccd300_priv))) == NULL)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
DBG (1, "ccd300_setup: not enough memory\n");
|
|
|
|
return; /* can you here the shit hitting the fan? */
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
dev->priv = priv;
|
|
|
|
memset (priv, 0, sizeof (mustek_pp_ccd300_priv));
|
|
|
|
|
|
|
|
priv->bw = 128;
|
|
|
|
priv->wait_bank = 700;
|
|
|
|
priv->top = 47;
|
|
|
|
|
|
|
|
sanei_pa4s2_enable (dev->fd, SANE_TRUE);
|
|
|
|
|
|
|
|
sanei_pa4s2_readbegin (dev->fd, 0);
|
|
|
|
sanei_pa4s2_readbyte (dev->fd, &asic);
|
|
|
|
sanei_pa4s2_readend (dev->fd);
|
|
|
|
sanei_pa4s2_readbegin (dev->fd, 2);
|
|
|
|
sanei_pa4s2_readbyte (dev->fd, &ccd);
|
|
|
|
sanei_pa4s2_readend (dev->fd);
|
|
|
|
ccd &= (asic == CCD300_ASIC1013 ? 0x04 : 0x05);
|
|
|
|
priv->asic = asic;
|
|
|
|
priv->ccd_type = ccd;
|
|
|
|
|
|
|
|
return_home (dev, SANE_TRUE);
|
|
|
|
lamp (dev, SANE_TRUE);
|
|
|
|
sanei_pa4s2_enable (dev->fd, SANE_FALSE);
|
|
|
|
dev->lamp_on = time (NULL);
|
|
|
|
dev->res = priv->hwres = 300;
|
|
|
|
dev->mode = MODE_COLOR;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
ccd300_close (SANE_Handle handle)
|
|
|
|
{
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
Mustek_pp_Handle *dev = handle;
|
|
|
|
mustek_pp_ccd300_priv *priv = dev->priv;
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
DBG (3, "ccd300_close: called for port ``%s''\n", dev->dev->port);
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
sanei_pa4s2_enable (dev->fd, SANE_TRUE);
|
|
|
|
lamp (dev, SANE_FALSE);
|
|
|
|
return_home (dev, SANE_FALSE);
|
|
|
|
sanei_pa4s2_enable (dev->fd, SANE_FALSE);
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
sanei_pa4s2_close (dev->fd);
|
|
|
|
free (priv);
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
DBG (3, "ccd300_close: device shut down and all buffers freed\n");
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
|
|
|
|
2003-01-13 19:49:47 +00:00
|
|
|
static SANE_Status
|
2003-01-12 19:44:26 +00:00
|
|
|
ccd300_config (SANE_Handle handle, SANE_String_Const optname,
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
SANE_String_Const optval)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
Mustek_pp_Handle *dev = handle;
|
|
|
|
mustek_pp_ccd300_priv *priv = dev->priv;
|
|
|
|
int value = -1;
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
DBG (3, "ccd300_config: called for port ``%s'' (%s%s%s)\n",
|
|
|
|
dev->dev->port,
|
|
|
|
optname, (optval ? " = " : ""), (optval ? optval : ""));
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
if (!strcmp (optname, "bw"))
|
|
|
|
{
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
if (!optval)
|
|
|
|
{
|
|
|
|
DBG (1, "ccd300_config: missing value for option ``bw''\n");
|
|
|
|
return SANE_STATUS_INVAL;
|
|
|
|
}
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
/* ok, ok, should be strtol... know what? send me a patch. */
|
|
|
|
value = atoi (optval);
|
|
|
|
|
|
|
|
if ((value < 0) || (value > 255))
|
|
|
|
{
|
|
|
|
DBG (1,
|
|
|
|
"ccd300_config: value ``%s'' for option ``bw'' is out of range (0 <= bw <= 255)\n",
|
|
|
|
optval);
|
|
|
|
return SANE_STATUS_INVAL;
|
|
|
|
}
|
|
|
|
|
|
|
|
priv->bw = value;
|
|
|
|
|
|
|
|
}
|
|
|
|
else if (!strcmp (optname, "waitbank"))
|
|
|
|
{
|
|
|
|
|
|
|
|
if (!optval)
|
|
|
|
{
|
|
|
|
DBG (1, "ccd300_config: missing value for option ``waitbank''\n");
|
|
|
|
return SANE_STATUS_INVAL;
|
|
|
|
}
|
|
|
|
|
|
|
|
value = atoi (optval);
|
|
|
|
|
|
|
|
if (value < 0)
|
|
|
|
{
|
|
|
|
DBG (1,
|
|
|
|
"ccd300_config: value ``%s'' for option ``waitbank'' is out of range (>= 0)\n",
|
|
|
|
optval);
|
|
|
|
return SANE_STATUS_INVAL;
|
|
|
|
}
|
|
|
|
|
|
|
|
priv->wait_bank = value;
|
|
|
|
}
|
|
|
|
else if (!strcmp (optname, "top"))
|
|
|
|
{
|
|
|
|
|
|
|
|
if (!optval)
|
|
|
|
{
|
|
|
|
DBG (1, "ccd300_config: missing value for option ``top''\n");
|
|
|
|
return SANE_STATUS_INVAL;
|
|
|
|
}
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
value = atoi (optval);
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
if (value < 0)
|
|
|
|
{
|
|
|
|
DBG (1,
|
|
|
|
"ccd300_config: value ``%s'' for option ``top'' is out of range (>= 0)\n",
|
|
|
|
optval);
|
|
|
|
return SANE_STATUS_INVAL;
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
priv->top = value;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
DBG (1, "ccd300_config: unkown option ``%s''", optname);
|
|
|
|
return SANE_STATUS_INVAL;
|
|
|
|
}
|
|
|
|
|
|
|
|
return SANE_STATUS_GOOD;
|
|
|
|
|
2003-01-12 19:44:26 +00:00
|
|
|
}
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
static void
|
|
|
|
ccd300_stop (SANE_Handle handle)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
Mustek_pp_Handle *dev = handle;
|
|
|
|
mustek_pp_ccd300_priv *priv = dev->priv;
|
|
|
|
int cnt;
|
|
|
|
|
|
|
|
DBG (3, "ccd300_stop: stopping scan operating on port ``%s''\n",
|
|
|
|
dev->dev->port);
|
2003-01-25 20:04:52 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
sanei_pa4s2_enable (dev->fd, SANE_TRUE);
|
|
|
|
return_home (dev, SANE_TRUE);
|
|
|
|
sanei_pa4s2_enable (dev->fd, SANE_FALSE);
|
|
|
|
|
|
|
|
free (priv->calib_r);
|
|
|
|
free (priv->calib_g);
|
|
|
|
free (priv->calib_b);
|
|
|
|
|
|
|
|
if (priv->red)
|
|
|
|
{
|
|
|
|
for (cnt = 0; cnt < priv->green_offs; cnt++)
|
|
|
|
free (priv->red[cnt]);
|
|
|
|
free (priv->red);
|
|
|
|
}
|
|
|
|
if (priv->blue)
|
|
|
|
{
|
|
|
|
for (cnt = 0; cnt < priv->blue_offs; cnt++)
|
|
|
|
free (priv->blue[cnt]);
|
|
|
|
free (priv->blue);
|
|
|
|
}
|
|
|
|
free (priv->green);
|
|
|
|
|
|
|
|
priv->calib_r = priv->calib_g = priv->calib_b = NULL;
|
|
|
|
priv->red = priv->blue = NULL;
|
|
|
|
priv->green = NULL;
|
2003-01-12 19:44:26 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2003-01-13 19:49:47 +00:00
|
|
|
static SANE_Status
|
|
|
|
ccd300_start (SANE_Handle handle)
|
2003-01-12 19:44:26 +00:00
|
|
|
{
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
Mustek_pp_Handle *dev = handle;
|
|
|
|
mustek_pp_ccd300_priv *priv = dev->priv;
|
|
|
|
|
|
|
|
DBG (3, "ccd300_start: called for port ``%s''\n", dev->dev->port);
|
|
|
|
|
|
|
|
if (dev->res <= 100)
|
|
|
|
priv->hwres = 100;
|
|
|
|
else if (dev->res <= 200)
|
|
|
|
priv->hwres = 200;
|
|
|
|
else if (dev->res <= 300)
|
|
|
|
priv->hwres = 300;
|
|
|
|
|
|
|
|
DBG (4, "ccd300_start: setting hardware resolution to %d dpi\n",
|
|
|
|
priv->hwres);
|
|
|
|
|
2003-12-01 10:17:28 +00:00
|
|
|
priv->skipimagebytes = dev->topX;
|
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
sanei_pa4s2_enable (dev->fd, SANE_TRUE);
|
|
|
|
config_ccd (dev);
|
|
|
|
set_voltages (dev);
|
|
|
|
get_bank_count (dev);
|
|
|
|
|
|
|
|
if (priv->bank_count != 0)
|
|
|
|
{
|
|
|
|
DBG (2, "ccd300_start: bank count is not zero...\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
return_home (dev, SANE_FALSE);
|
|
|
|
|
|
|
|
priv->motor_step = 0;
|
|
|
|
|
|
|
|
/* allocate memory for calibration */
|
|
|
|
if ((priv->calib_g = malloc (dev->params.pixels_per_line)) == NULL)
|
|
|
|
{
|
|
|
|
sanei_pa4s2_enable (dev->fd, SANE_FALSE);
|
|
|
|
DBG (1, "ccd300_start: not enough memory\n");
|
|
|
|
return SANE_STATUS_NO_MEM;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (dev->mode == MODE_COLOR)
|
|
|
|
{
|
|
|
|
priv->calib_r = malloc (dev->params.pixels_per_line);
|
|
|
|
priv->calib_b = malloc (dev->params.pixels_per_line);
|
|
|
|
|
|
|
|
if ((priv->calib_r == NULL) || (priv->calib_b == NULL))
|
|
|
|
{
|
|
|
|
free (priv->calib_g);
|
|
|
|
free (priv->calib_r);
|
|
|
|
free (priv->calib_b);
|
|
|
|
priv->calib_r = priv->calib_g = priv->calib_b = NULL;
|
|
|
|
|
|
|
|
sanei_pa4s2_enable (dev->fd, SANE_FALSE);
|
|
|
|
DBG (1, "ccd300_start: not enough memory\n");
|
|
|
|
return SANE_STATUS_NO_MEM;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
calibrate (dev);
|
|
|
|
|
|
|
|
if (priv->ccd_type == 1)
|
|
|
|
{
|
|
|
|
priv->blue_offs = 4;
|
|
|
|
priv->green_offs = 8;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
priv->blue_offs = 8;
|
|
|
|
priv->green_offs = 16;
|
|
|
|
}
|
|
|
|
|
|
|
|
move_motor (dev, priv->top + dev->topY -
|
|
|
|
(dev->mode == MODE_COLOR ? priv->green_offs : 0), SANE_TRUE);
|
|
|
|
|
|
|
|
if (priv->ccd_type == 1)
|
|
|
|
sanei_pa4s2_writebyte (dev->fd, 6, 0x15);
|
|
|
|
|
|
|
|
sanei_pa4s2_enable (dev->fd, SANE_FALSE);
|
|
|
|
|
|
|
|
if (dev->mode == MODE_COLOR)
|
|
|
|
{
|
|
|
|
int failed = SANE_FALSE, cnt;
|
|
|
|
|
2003-12-01 11:52:19 +00:00
|
|
|
priv->line_step = SANE_FIX (300.0 / (float) dev->res);
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
priv->rdiff = priv->line_step;
|
|
|
|
priv->bdiff = priv->rdiff + (priv->blue_offs << SANE_FIXED_SCALE_SHIFT);
|
|
|
|
priv->gdiff =
|
|
|
|
priv->rdiff + (priv->green_offs << SANE_FIXED_SCALE_SHIFT);
|
|
|
|
|
|
|
|
priv->red = malloc (sizeof (SANE_Byte *) * priv->green_offs);
|
|
|
|
priv->blue = malloc (sizeof (SANE_Byte *) * priv->blue_offs);
|
|
|
|
priv->green = malloc (dev->params.pixels_per_line);
|
|
|
|
|
|
|
|
if ((priv->red == NULL) || (priv->blue == NULL)
|
|
|
|
|| (priv->green == NULL))
|
|
|
|
{
|
|
|
|
free (priv->calib_r);
|
|
|
|
free (priv->calib_g);
|
|
|
|
free (priv->calib_b);
|
|
|
|
priv->calib_r = priv->calib_g = priv->calib_b = NULL;
|
|
|
|
|
|
|
|
free (priv->red);
|
|
|
|
free (priv->green);
|
|
|
|
free (priv->blue);
|
|
|
|
priv->red = priv->blue = NULL;
|
|
|
|
priv->green = NULL;
|
|
|
|
|
|
|
|
DBG (1, "ccd300_start: not enough memory for ld buffers\n");
|
|
|
|
return SANE_STATUS_NO_MEM;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* note to myself: better allocate one huge chunk of memory and set
|
|
|
|
pointers */
|
|
|
|
for (cnt = 0; cnt < priv->green_offs; cnt++)
|
|
|
|
if ((priv->red[cnt] = malloc (dev->params.pixels_per_line)) == NULL)
|
|
|
|
failed = SANE_TRUE;
|
|
|
|
|
|
|
|
for (cnt = 0; cnt < priv->blue_offs; cnt++)
|
|
|
|
if ((priv->blue[cnt] = malloc (dev->params.pixels_per_line)) == NULL)
|
|
|
|
failed = SANE_TRUE;
|
|
|
|
|
|
|
|
if (failed == SANE_TRUE)
|
|
|
|
{
|
|
|
|
free (priv->calib_r);
|
|
|
|
free (priv->calib_g);
|
|
|
|
free (priv->calib_b);
|
|
|
|
priv->calib_r = priv->calib_g = priv->calib_b = NULL;
|
|
|
|
|
|
|
|
for (cnt = 0; cnt < priv->green_offs; cnt++)
|
|
|
|
free (priv->red[cnt]);
|
|
|
|
for (cnt = 0; cnt < priv->blue_offs; cnt++)
|
|
|
|
free (priv->blue[cnt]);
|
|
|
|
|
|
|
|
free (priv->red);
|
|
|
|
free (priv->green);
|
|
|
|
free (priv->blue);
|
|
|
|
priv->red = priv->blue = NULL;
|
|
|
|
priv->green = NULL;
|
|
|
|
|
|
|
|
DBG (1, "ccd300_start: not enough memory for ld buffers\n");
|
|
|
|
return SANE_STATUS_NO_MEM;
|
|
|
|
}
|
|
|
|
|
|
|
|
priv->redline = priv->blueline = priv->ccd_line = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
priv->lines = 0;
|
|
|
|
priv->lines_left = dev->params.lines;
|
|
|
|
|
|
|
|
DBG (3, "ccd300_start: device ready for scanning\n");
|
|
|
|
|
|
|
|
return SANE_STATUS_GOOD;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
ccd300_read (SANE_Handle handle, SANE_Byte * buffer)
|
|
|
|
{
|
|
|
|
Mustek_pp_Handle *dev = handle;
|
|
|
|
mustek_pp_ccd300_priv *priv = dev->priv;
|
|
|
|
|
|
|
|
DBG (3, "ccd300_read: receiving one line from port ``%s''\n",
|
|
|
|
dev->dev->port);
|
|
|
|
|
|
|
|
sanei_pa4s2_enable (dev->fd, SANE_TRUE);
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
switch (dev->mode)
|
|
|
|
{
|
2003-01-12 19:44:26 +00:00
|
|
|
case MODE_BW:
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
get_lineart_line (dev, buffer);
|
2003-01-12 19:44:26 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case MODE_GRAYSCALE:
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
get_grayscale_line (dev, buffer);
|
2003-01-12 19:44:26 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case MODE_COLOR:
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
get_color_line (dev, buffer);
|
2003-01-12 19:44:26 +00:00
|
|
|
break;
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
}
|
2003-01-25 20:04:52 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
priv->lines_left--;
|
|
|
|
priv->lines++;
|
2003-01-12 19:44:26 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
DBG (4, "ccd300_read: %d lines read (%d to go)\n", priv->lines,
|
|
|
|
priv->lines_left);
|
2003-01-13 19:49:47 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
if (priv->lines_left == 0)
|
|
|
|
{
|
|
|
|
DBG (3, "ccd300_read: scan finished\n");
|
|
|
|
return_home (dev, SANE_TRUE);
|
|
|
|
}
|
2003-01-13 19:49:47 +00:00
|
|
|
|
2003-11-23 Jochen Eisinger <jochen@penguin-breeder.org>
* backend/mustek_pp.c, sanei/sanei_pa4s2.c: added support for auto
probing of the port
* configure{.in}, backend/mustek_pp_ccd.*, backend/Makefile.in,
backend/dll.conf, doc/sane-mustek_pp_ccd.man, doc/sane.man,
doc/Makefile.in, doc/descriptions/mustek_pp_ccd.desc: mustek_pp_ccd
backend removed
* backend/mustek_pp.conf, mustek_pp_ccd300.[ch],
doc/sane-mustek_pp.man, doc/descriptions/mustek_pp.desc: fixed CCD
support for mustek_pp backend
* backend/mustek_pp_null.c: beautified debug scanner name
2003-11-24 08:58:19 +00:00
|
|
|
sanei_pa4s2_enable (dev->fd, SANE_FALSE);
|
2003-01-25 20:04:52 +00:00
|
|
|
|
2003-01-13 19:49:47 +00:00
|
|
|
}
|