kopia lustrzana https://gitlab.com/sane-project/backends
- added genesys backend from experimental area
rodzic
38e6ad0adb
commit
bce76371c4
|
@ -103,6 +103,8 @@ DISTFILES = abaton.c abaton.conf abaton.h agfafocus.c agfafocus.conf \
|
|||
gt68xx_low.c gt68xx_low.h gt68xx_devices.c gt68xx_generic.c \
|
||||
gt68xx_generic.h gt68xx_shm_channel.c gt68xx_shm_channel.c \
|
||||
gt68xx_shm_channel.h gt68xx.conf \
|
||||
genesys.c genesys.h genesys_gl646.c genesys_low.h \
|
||||
genesys.conf genesys_devices.c genesys_gl841.c \
|
||||
hp-accessor.c hp-accessor.h hp.c hp.conf \
|
||||
hp-device.c hp-device.h hp.h hp-handle.c hp-handle.h hp-hpmem.c hp-option.c \
|
||||
hp-option.h hp.README hp-scl.c hp-scl.h hp-scsi.h hp.TODO \
|
||||
|
@ -262,6 +264,7 @@ libsane.la: dll.lo dll-s.lo $(EXTRA) $(addsuffix .lo,$(DLL_PRELOAD)) $(LIBOBJS)
|
|||
# additional dependencies
|
||||
|
||||
EXTRA_canon_pp = canon_pp-io canon_pp-dev
|
||||
EXTRA_genesys = genesys_gl646 genesys_gl841
|
||||
EXTRA_hp = hp-accessor hp-device hp-handle hp-hpmem hp-option hp-scl
|
||||
EXTRA_umax_pp = umax_pp_low umax_pp_mid
|
||||
EXTRA_epson = epson_scsi epson_usb
|
||||
|
@ -331,6 +334,9 @@ libsane-fujitsu.la: ../sanei/sanei_scsi.lo
|
|||
libsane-fujitsu.la: ../sanei/sanei_usb.lo
|
||||
libsane-fujitsu.la: ../sanei/sanei_thread.lo
|
||||
libsane-gphoto2.la: ../sanei/sanei_constrain_value.lo ../sanei/sanei_jpeg.lo
|
||||
libsane-genesys.la: ../sanei/sanei_constrain_value.lo
|
||||
libsane-genesys.la: ../sanei/sanei_usb.lo
|
||||
libsane-genesys.la: $(addsuffix .lo,$(EXTRA_genesys))
|
||||
libsane-gt68xx.la: ../sanei/sanei_constrain_value.lo
|
||||
libsane-gt68xx.la: ../sanei/sanei_usb.lo
|
||||
libsane-hp.la: ../sanei/sanei_config2.lo
|
||||
|
@ -478,6 +484,7 @@ endif
|
|||
|
||||
depend:
|
||||
makedepend $(INCLUDES) *.c
|
||||
makedepend -a -o.lo $(INCLUDES) *.c
|
||||
|
||||
clean:
|
||||
rm -f *.lo *.o *.la libsane.la dll-preload.c
|
||||
|
|
Plik diff jest za duży
Load Diff
|
@ -0,0 +1,31 @@
|
|||
# genesys.conf: Configuration file for Genesys Logic GL646 and GL841 based scanners
|
||||
|
||||
#
|
||||
# scanners that are not yet supported
|
||||
# uncomment them only for developpment purpose
|
||||
#
|
||||
|
||||
# UMAX Astra 4500 and Avision iVina 1600
|
||||
#usb 0x0638 0x0a10
|
||||
|
||||
# Canon LiDE 50
|
||||
#usb 0x04a9 0x2213
|
||||
|
||||
# Hewlett Packard ScanJet 2400c
|
||||
#usb 0x03f0 0x0a01
|
||||
|
||||
# Hewlett Packard ScanJet 3670c
|
||||
#usb 0x03f0 0x1405
|
||||
|
||||
# Plustek OpticPro ST24
|
||||
#usb 0x07b3 0x0601
|
||||
|
||||
#
|
||||
# supported scanners
|
||||
#
|
||||
|
||||
# Medion MD5345/MD6228/MD6471
|
||||
usb 0x0461 0x0377
|
||||
|
||||
# Hewlett Packard ScanJet 2300c
|
||||
usb 0x03f0 0x0901
|
|
@ -0,0 +1,105 @@
|
|||
/* sane - Scanner Access Now Easy.
|
||||
|
||||
Copyright (C) 2003, 2004 Henning Meier-Geinitz <henning@meier-geinitz.de>
|
||||
Copyright (C) 2005 Stephane Voltz <svoltz@numericable.fr>
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
#ifndef GENESYS_H
|
||||
#define GENESYS_H
|
||||
|
||||
#include "genesys_low.h"
|
||||
|
||||
#define ENABLE(OPTION) s->opt[OPTION].cap &= ~SANE_CAP_INACTIVE
|
||||
#define DISABLE(OPTION) s->opt[OPTION].cap |= SANE_CAP_INACTIVE
|
||||
#define IS_ACTIVE(OPTION) (((s->opt[OPTION].cap) & SANE_CAP_INACTIVE) == 0)
|
||||
|
||||
#define GENESYS_CONFIG_FILE "genesys.conf"
|
||||
|
||||
/* Maximum time for lamp warm-up */
|
||||
#define WARMUP_TIME 45
|
||||
|
||||
#ifndef SANE_I18N
|
||||
#define SANE_I18N(text) text
|
||||
#endif
|
||||
|
||||
|
||||
/** List of SANE options
|
||||
*/
|
||||
enum Genesys_Option
|
||||
{
|
||||
OPT_NUM_OPTS = 0,
|
||||
|
||||
OPT_MODE_GROUP,
|
||||
OPT_MODE,
|
||||
OPT_SOURCE,
|
||||
OPT_PREVIEW,
|
||||
OPT_BIT_DEPTH,
|
||||
OPT_RESOLUTION,
|
||||
|
||||
OPT_GEOMETRY_GROUP,
|
||||
OPT_TL_X, /* top-left x */
|
||||
OPT_TL_Y, /* top-left y */
|
||||
OPT_BR_X, /* bottom-right x */
|
||||
OPT_BR_Y, /* bottom-right y */
|
||||
|
||||
OPT_EXTRAS_GROUP,
|
||||
OPT_LAMP_OFF_TIME,
|
||||
/* must come last: */
|
||||
NUM_OPTIONS
|
||||
};
|
||||
|
||||
|
||||
/** Scanner object.
|
||||
*/
|
||||
typedef struct Genesys_Scanner
|
||||
{
|
||||
struct Genesys_Scanner *next; /**< Next scanner in list */
|
||||
Genesys_Device *dev; /**< Low-level device object */
|
||||
|
||||
/* SANE data */
|
||||
SANE_Bool scanning; /**< We are currently scanning */
|
||||
SANE_Option_Descriptor opt[NUM_OPTIONS]; /**< Option descriptors */
|
||||
Option_Value val[NUM_OPTIONS]; /**< Option values */
|
||||
SANE_Parameters params; /**< SANE Parameters */
|
||||
SANE_Int bpp_list[5]; /**< */
|
||||
} Genesys_Scanner;
|
||||
|
||||
#endif /* not GENESYS_H */
|
|
@ -0,0 +1,623 @@
|
|||
/* sane - Scanner Access Now Easy.
|
||||
|
||||
Copyright (C) 2003 Oliver Rauch
|
||||
Copyright (C) 2003, 2004 Henning Meier-Geinitz <henning@meier-geinitz.de>
|
||||
Copyright (C) 2004, 2005 Gerhard Jaeger <gerhard@gjaeger.de>
|
||||
Copyright (C) 2004, 2005 Stephane Voltz <svoltz@numericable.fr>
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
/* Some setup DAC and CCD tables */
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
/** Setup table for various scanners using a Wolfson DAC
|
||||
*/
|
||||
static Genesys_Frontend Wolfson[] = {
|
||||
{{0x00, 0x03, 0x05, 0x11}
|
||||
, {0x00, 0x00, 0x00}
|
||||
, {0x80, 0x80, 0x80}
|
||||
, {0x02, 0x02, 0x02}
|
||||
}
|
||||
, /* UMAX */
|
||||
{{0x00, 0x03, 0x05, 0x03}
|
||||
, {0x00, 0x00, 0x00}
|
||||
, {0xc8, 0xc8, 0xc8}
|
||||
, {0x04, 0x04, 0x04}
|
||||
}
|
||||
, /* ST12 */
|
||||
{{0x00, 0x03, 0x05, 0x21}
|
||||
, {0x00, 0x00, 0x00}
|
||||
, {0xc8, 0xc8, 0xc8}
|
||||
, {0x06, 0x06, 0x06}
|
||||
}
|
||||
, /* ST24 */
|
||||
{{0x00, 0x03, 0x05, 0x12}
|
||||
, {0x00, 0x00, 0x00}
|
||||
, {0xc8, 0xc8, 0xc8}
|
||||
, {0x04, 0x04, 0x04}
|
||||
}
|
||||
, /* MD6228/MD6471 */
|
||||
{{0x00, 0x03, 0x05, 0x02}
|
||||
, {0x00, 0x00, 0x00}
|
||||
, {0xc0, 0xc0, 0xc0}
|
||||
, {0x07, 0x07, 0x07}
|
||||
}
|
||||
, /* HP2400c */
|
||||
{{0x00, 0x03, 0x04, 0x02}
|
||||
, {0x00, 0x00, 0x00}
|
||||
, {0xb0, 0xb0, 0xb0}
|
||||
, {0x04, 0x04, 0x04}
|
||||
}
|
||||
, /* HP2300c */
|
||||
};
|
||||
|
||||
|
||||
/** for setting up the sensor-specific settings:
|
||||
* Optical Resolution, number of black pixels, number of dummy pixels,
|
||||
* CCD_start_xoffset, and overall number of sensor pixels
|
||||
* registers 0x08-0x0b, 0x10-0x1d and 0x52-0x59
|
||||
*/
|
||||
static Genesys_Sensor Sensor[] = {
|
||||
/* UMAX */
|
||||
{1200, 48, 64, 0, 10800, 210, 230,
|
||||
{0x01, 0x03, 0x05, 0x07}
|
||||
,
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x05, 0x31, 0x2a, 0x00, 0x00,
|
||||
0x00, 0x02}
|
||||
,
|
||||
{0x13, 0x17, 0x03, 0x07, 0x0b, 0x0f, 0x23, 0x00, 0xc1, 0x00, 0x00, 0x00,
|
||||
0x00}
|
||||
,
|
||||
1.0, 1.0, 1.0,
|
||||
NULL, NULL, NULL}
|
||||
,
|
||||
/* Plustek OpticPro S12/ST12 */
|
||||
{600, 48, 85, 152, 5416, 210, 230,
|
||||
{0x02, 0x00, 0x06, 0x04}
|
||||
,
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x08, 0x20, 0x2a, 0x00, 0x00,
|
||||
0x0c, 0x03}
|
||||
,
|
||||
{0x0f, 0x13, 0x17, 0x03, 0x07, 0x0b, 0x83, 0x00, 0xc1, 0x00, 0x00, 0x00,
|
||||
0x00}
|
||||
,
|
||||
1.0, 1.0, 1.0,
|
||||
NULL, NULL, NULL}
|
||||
,
|
||||
/* Plustek OpticPro S24/ST24 */
|
||||
{1200, 48, 64, 0, 10800, 210, 230,
|
||||
{0x0e, 0x0c, 0x00, 0x0c}
|
||||
,
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x08, 0x31, 0x2a, 0x00, 0x00,
|
||||
0x00, 0x02}
|
||||
,
|
||||
{0x17, 0x03, 0x07, 0x0b, 0x0f, 0x13, 0x03, 0x00, 0xc1, 0x00, 0x00, 0x00,
|
||||
0x00}
|
||||
,
|
||||
1.0, 1.0, 1.0,
|
||||
NULL, NULL, NULL}
|
||||
,
|
||||
/* MD6471 */
|
||||
{1200,
|
||||
48,
|
||||
16, 0, 10872,
|
||||
210, 200,
|
||||
{0x0d, 0x0f, 0x11, 0x13}
|
||||
,
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x30, 0x2a, 0x00, 0x00,
|
||||
0x00, 0x03}
|
||||
,
|
||||
{0x0f, 0x13, 0x17, 0x03, 0x07, 0x0b, 0x23, 0x00, 0xc1, 0x00, 0x00, 0x00,
|
||||
0x00}
|
||||
,
|
||||
2.38, 2.35, 2.34,
|
||||
NULL, NULL, NULL}
|
||||
,
|
||||
/* HP2400c */
|
||||
{1200,
|
||||
48,
|
||||
15, 0, 10872, 210, 200,
|
||||
{0x14, 0x15, 0x00, 0x00}
|
||||
,
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x08, 0x30, 0x2a, 0x00, 0x00,
|
||||
0x00, 0x02}
|
||||
,
|
||||
{0x0b, 0x0f, 0x13, 0x17, 0x03, 0x07, 0x63, 0x00, 0xc1, 0x00, 0x00, 0x00,
|
||||
0x00}
|
||||
,
|
||||
1.0, 1.0, 1.0,
|
||||
NULL, NULL, NULL}
|
||||
,
|
||||
/* HP2300c */
|
||||
{600,
|
||||
48,
|
||||
20, 0, 5454, 210, 200,
|
||||
{0x16, 0x00, 0x01, 0x03}
|
||||
,
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb7, 0x0a, 0x20, 0x2a, 0x6a, 0x8a,
|
||||
0x00, 0x05}
|
||||
,
|
||||
{0x0f, 0x13, 0x17, 0x03, 0x07, 0x0b, 0x83, 0x00, 0xc1, 0x06, 0x0b, 0x10,
|
||||
0x16}
|
||||
,
|
||||
2.1, 2.1, 2.1,
|
||||
NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
/** for General Purpose Output specific settings:
|
||||
* initial GPO value (registers 0x66-0x67)
|
||||
* GPO enable mask (registers 0x68-0x69)
|
||||
*/
|
||||
static Genesys_Gpo Gpo[] = {
|
||||
/* UMAX */
|
||||
{
|
||||
{0x11, 0x00}
|
||||
,
|
||||
{0x51, 0x20}
|
||||
,
|
||||
}
|
||||
,
|
||||
/* Plustek OpticPro S12/ST12 */
|
||||
{
|
||||
{0x11, 0x00}
|
||||
,
|
||||
{0x51, 0x20}
|
||||
,
|
||||
}
|
||||
,
|
||||
/* Plustek OpticPro S24/ST24 */
|
||||
{
|
||||
{0x00, 0x00}
|
||||
,
|
||||
{0x51, 0x20}
|
||||
,
|
||||
}
|
||||
,
|
||||
/* MD5345/MD6471 */
|
||||
{
|
||||
{0x30, 0x00}
|
||||
, /* bits 11-12 are for bipolar V-ref input voltage */
|
||||
{0xa0, 0x18}
|
||||
,
|
||||
}
|
||||
,
|
||||
/* HP2400C */
|
||||
{
|
||||
{0x30, 0x00}
|
||||
,
|
||||
{0x31, 0x00}
|
||||
,
|
||||
}
|
||||
,
|
||||
/* HP2300C */
|
||||
{
|
||||
{0x00, 0x00}
|
||||
,
|
||||
{0x00, 0x00}
|
||||
,
|
||||
}
|
||||
};
|
||||
|
||||
#define MOTOR_ST24 2
|
||||
static Genesys_Motor Motor[] = {
|
||||
/* UMAX */
|
||||
{
|
||||
1200, /* motor base steps */
|
||||
2400 /* maximum motor resolution */
|
||||
}
|
||||
,
|
||||
{ /* MD5345/6228/6471 */
|
||||
1200,
|
||||
2400}
|
||||
,
|
||||
{ /* ST24 */
|
||||
2400,
|
||||
2400}
|
||||
,
|
||||
{ /* HP 2400c */
|
||||
1200,
|
||||
2400}
|
||||
,
|
||||
{ /* HP 2300c */
|
||||
600,
|
||||
1200}
|
||||
};
|
||||
|
||||
/* here we have the various device settings...
|
||||
*/
|
||||
static Genesys_Model umax_astra_4500_model = {
|
||||
"umax-astra-4500", /* Name */
|
||||
"UMAX", /* Device vendor string */
|
||||
"Astra 4500", /* Device model name */
|
||||
GENESYS_GL646,
|
||||
NULL,
|
||||
|
||||
{1200, 600, 300, 150, 75, 0}, /* possible x-resolutions */
|
||||
{2400, 1200, 600, 300, 150, 75, 0}, /* possible y-resolutions */
|
||||
{16, 8, 0}, /* possible depths in gray mode */
|
||||
{16, 8, 0}, /* possible depths in color mode */
|
||||
|
||||
SANE_FIX (3.5), /* Start of scan area in mm (x) */
|
||||
SANE_FIX (7.5), /* Start of scan area in mm (y) */
|
||||
SANE_FIX (218.0), /* Size of scan area in mm (x) */
|
||||
SANE_FIX (299.0), /* Size of scan area in mm (y) */
|
||||
|
||||
SANE_FIX (0.0), /* Start of white strip in mm (y) */
|
||||
SANE_FIX (1.0), /* Start of black mark in mm (x) */
|
||||
|
||||
SANE_FIX (0.0), /* Start of scan area in TA mode in mm (x) */
|
||||
SANE_FIX (0.0), /* Start of scan area in TA mode in mm (y) */
|
||||
SANE_FIX (100.0), /* Size of scan area in TA mode in mm (x) */
|
||||
SANE_FIX (100.0), /* Size of scan area in TA mode in mm (y) */
|
||||
|
||||
SANE_FIX (0.0), /* Start of white strip in TA mode in mm (y) */
|
||||
|
||||
0, 8, 16, /* RGB CCD Line-distance correction in pixel */
|
||||
|
||||
COLOR_ORDER_BGR, /* Order of the CCD/CIS colors */
|
||||
|
||||
SANE_FALSE, /* Is this a CIS scanner? */
|
||||
CCD_UMAX,
|
||||
DAC_WOLFSON_UMAX,
|
||||
GPO_UMAX,
|
||||
MOTOR_UMAX,
|
||||
GENESYS_FLAG_UNTESTED, /* Which flags are needed for this scanner? */
|
||||
/* untested, values set by hmg */
|
||||
20,
|
||||
200
|
||||
};
|
||||
|
||||
static Genesys_Model canon_lide_50_model = {
|
||||
"canon-lide-50", /* Name */
|
||||
"Canon", /* Device vendor string */
|
||||
"LiDE 35/50", /* Device model name */
|
||||
GENESYS_GL646,
|
||||
NULL,
|
||||
|
||||
{1200, 600, 300, 150, 75, 0}, /* possible x-resolutions */
|
||||
{2400, 1200, 600, 300, 150, 75, 0}, /* possible y-resolutions */
|
||||
{16, 8, 0}, /* possible depths in gray mode */
|
||||
{16, 8, 0}, /* possible depths in color mode */
|
||||
|
||||
SANE_FIX (3.5), /* Start of scan area in mm (x) */
|
||||
SANE_FIX (7.5), /* Start of scan area in mm (y) */
|
||||
SANE_FIX (218.0), /* Size of scan area in mm (x) */
|
||||
SANE_FIX (299.0), /* Size of scan area in mm (y) */
|
||||
|
||||
SANE_FIX (0.0), /* Start of white strip in mm (y) */
|
||||
SANE_FIX (1.0), /* Start of black mark in mm (x) */
|
||||
|
||||
SANE_FIX (0.0), /* Start of scan area in TA mode in mm (x) */
|
||||
SANE_FIX (0.0), /* Start of scan area in TA mode in mm (y) */
|
||||
SANE_FIX (100.0), /* Size of scan area in TA mode in mm (x) */
|
||||
SANE_FIX (100.0), /* Size of scan area in TA mode in mm (y) */
|
||||
|
||||
SANE_FIX (0.0), /* Start of white strip in TA mode in mm (y) */
|
||||
|
||||
0, 0, 0, /* RGB CCD Line-distance correction in pixel */
|
||||
|
||||
COLOR_ORDER_BGR, /* Order of the CCD/CIS colors */
|
||||
|
||||
SANE_TRUE, /* Is this a CIS scanner? */
|
||||
CCD_UMAX,
|
||||
DAC_WOLFSON_UMAX,
|
||||
GPO_UMAX,
|
||||
MOTOR_UMAX,
|
||||
GENESYS_FLAG_UNTESTED, /* Which flags are needed for this scanner? */
|
||||
/* untested, values set by hmg */
|
||||
20,
|
||||
200
|
||||
};
|
||||
|
||||
static Genesys_Model hp2300c_model = {
|
||||
"hewlett-packard-scanjet-2300c", /* Name */
|
||||
"Hewlett Packard", /* Device vendor string */
|
||||
"ScanJet 2300c", /* Device model name */
|
||||
GENESYS_GL646,
|
||||
NULL,
|
||||
|
||||
{600, 300, 150, 75, 0}, /* possible x-resolutions */
|
||||
{1200, 600, 300, 150, 75, 0}, /* possible y-resolutions, motor can go up to 1200 dpi */
|
||||
{16, 8, 0}, /* possible depths in gray mode */
|
||||
{16, 8, 0}, /* possible depths in color mode */
|
||||
|
||||
SANE_FIX (-2.0), /* Start of scan area in mm (x_offset) */
|
||||
SANE_FIX (-2.0), /* Start of scan area in mm (y_offset) */
|
||||
SANE_FIX (215.9), /* Size of scan area in mm (x) */
|
||||
SANE_FIX (297.1), /* Size of scan area in mm (y) */
|
||||
|
||||
SANE_FIX (0.0), /* Start of white strip in mm (y) */
|
||||
SANE_FIX (1.0), /* Start of black mark in mm (x) */
|
||||
|
||||
SANE_FIX (0.0), /* Start of scan area in TA mode in mm (x) */
|
||||
SANE_FIX (0.0), /* Start of scan area in TA mode in mm (y) */
|
||||
SANE_FIX (100.0), /* Size of scan area in TA mode in mm (x) */
|
||||
SANE_FIX (100.0), /* Size of scan area in TA mode in mm (y) */
|
||||
|
||||
SANE_FIX (0.0), /* Start of white strip in TA mode in mm (y) */
|
||||
|
||||
16, 8, 0, /* RGB CCD Line-distance correction in pixel */
|
||||
|
||||
COLOR_ORDER_RGB, /* Order of the CCD/CIS colors */
|
||||
|
||||
SANE_FALSE, /* Is this a CIS scanner? */
|
||||
CCD_HP2300,
|
||||
DAC_WOLFSON_HP2300,
|
||||
GPO_HP2300,
|
||||
MOTOR_HP2300,
|
||||
GENESYS_FLAG_REPARK
|
||||
| GENESYS_FLAG_14BIT_GAMMA
|
||||
| GENESYS_FLAG_SEARCH_START
|
||||
| GENESYS_FLAG_MUST_WAIT
|
||||
| GENESYS_FLAG_DARK_CALIBRATION | GENESYS_FLAG_OFFSET_CALIBRATION,
|
||||
9,
|
||||
132
|
||||
};
|
||||
|
||||
static Genesys_Model hp2400c_model = {
|
||||
"hewlett-packard-scanjet-2400c", /* Name */
|
||||
"Hewlett Packard", /* Device vendor string */
|
||||
"ScanJet 2400c", /* Device model name */
|
||||
GENESYS_GL646,
|
||||
NULL,
|
||||
|
||||
{1200, 600, 300, 150, 75, 0}, /* possible x-resolutions */
|
||||
{2400, 1200, 600, 300, 150, 75, 0}, /* possible y-resolutions */
|
||||
{16, 8, 0}, /* possible depths in gray mode */
|
||||
{16, 8, 0}, /* possible depths in color mode */
|
||||
|
||||
SANE_FIX (3.5), /* Start of scan area in mm (x) */
|
||||
SANE_FIX (7.5), /* Start of scan area in mm (y) */
|
||||
SANE_FIX (215.9), /* Size of scan area in mm (x) */
|
||||
SANE_FIX (297.2), /* Size of scan area in mm (y) */
|
||||
|
||||
SANE_FIX (0.0), /* Start of white strip in mm (y) */
|
||||
SANE_FIX (1.0), /* Start of black mark in mm (x) */
|
||||
|
||||
SANE_FIX (0.0), /* Start of scan area in TA mode in mm (x) */
|
||||
SANE_FIX (0.0), /* Start of scan area in TA mode in mm (y) */
|
||||
SANE_FIX (100.0), /* Size of scan area in TA mode in mm (x) */
|
||||
SANE_FIX (100.0), /* Size of scan area in TA mode in mm (y) */
|
||||
|
||||
SANE_FIX (0.0), /* Start of white strip in TA mode in mm (y) */
|
||||
|
||||
0, 8, 16, /* RGB CCD Line-distance correction in pixel */
|
||||
|
||||
COLOR_ORDER_BGR, /* Order of the CCD/CIS colors */
|
||||
|
||||
SANE_FALSE, /* Is this a CIS scanner? */
|
||||
CCD_HP2400,
|
||||
DAC_WOLFSON_HP2400,
|
||||
GPO_HP2400,
|
||||
MOTOR_HP2400,
|
||||
GENESYS_FLAG_UNTESTED
|
||||
| GENESYS_FLAG_REPARK | GENESYS_FLAG_USE_PARK | GENESYS_FLAG_14BIT_GAMMA,
|
||||
20,
|
||||
132
|
||||
};
|
||||
|
||||
static Genesys_Model hp3670c_model = {
|
||||
"hewlett-packard-scanjet-3670c", /* Name */
|
||||
"Hewlett Packard", /* Device vendor string */
|
||||
"ScanJet 3670c", /* Device model name */
|
||||
GENESYS_GL646,
|
||||
NULL,
|
||||
|
||||
{1200, 600, 300, 150, 75, 0}, /* possible x-resolutions */
|
||||
{2400, 1200, 600, 300, 150, 75, 0}, /* possible y-resolutions */
|
||||
{16, 8, 0}, /* possible depths in gray mode */
|
||||
{16, 8, 0}, /* possible depths in color mode */
|
||||
|
||||
SANE_FIX (3.5), /* Start of scan area in mm (x) */
|
||||
SANE_FIX (7.5), /* Start of scan area in mm (y) */
|
||||
SANE_FIX (215.9), /* Size of scan area in mm (x) */
|
||||
SANE_FIX (297.2), /* Size of scan area in mm (y) */
|
||||
|
||||
SANE_FIX (0.0), /* Start of white strip in mm (y) */
|
||||
SANE_FIX (1.0), /* Start of black mark in mm (x) */
|
||||
|
||||
SANE_FIX (0.0), /* Start of scan area in TA mode in mm (x) */
|
||||
SANE_FIX (0.0), /* Start of scan area in TA mode in mm (y) */
|
||||
SANE_FIX (100.0), /* Size of scan area in TA mode in mm (x) */
|
||||
SANE_FIX (100.0), /* Size of scan area in TA mode in mm (y) */
|
||||
|
||||
SANE_FIX (0.0), /* Start of white strip in TA mode in mm (y) */
|
||||
|
||||
0, 8, 16, /* RGB CCD Line-distance correction in pixel */
|
||||
|
||||
COLOR_ORDER_BGR, /* Order of the CCD/CIS colors */
|
||||
|
||||
SANE_FALSE, /* Is this a CIS scanner? */
|
||||
CCD_UMAX,
|
||||
DAC_WOLFSON_UMAX,
|
||||
GPO_UMAX,
|
||||
MOTOR_UMAX,
|
||||
GENESYS_FLAG_UNTESTED, /* Which flags are needed for this scanner? */
|
||||
/* untested, values set by mike p. according to vendor's datasheet. */
|
||||
20,
|
||||
200
|
||||
};
|
||||
|
||||
static Genesys_Model plustek_st12_model = {
|
||||
"plustek-opticpro-st12", /* Name */
|
||||
"Plustek", /* Device vendor string */
|
||||
"OpticPro ST12", /* Device model name */
|
||||
GENESYS_GL646,
|
||||
NULL,
|
||||
|
||||
{600, 300, 150, 75, 0}, /* possible x-resolutions */
|
||||
{1200, 600, 300, 150, 75, 0}, /* possible y-resolutions */
|
||||
{16, 8, 0}, /* possible depths in gray mode */
|
||||
{16, 8, 0}, /* possible depths in color mode */
|
||||
|
||||
SANE_FIX (3.5), /* Start of scan area in mm (x) */
|
||||
SANE_FIX (7.5), /* Start of scan area in mm (y) */
|
||||
SANE_FIX (218.0), /* Size of scan area in mm (x) */
|
||||
SANE_FIX (299.0), /* Size of scan area in mm (y) */
|
||||
|
||||
SANE_FIX (0.0), /* Start of white strip in mm (y) */
|
||||
SANE_FIX (1.0), /* Start of black mark in mm (x) */
|
||||
|
||||
SANE_FIX (0.0), /* Start of scan area in TA mode in mm (x) */
|
||||
SANE_FIX (0.0), /* Start of scan area in TA mode in mm (y) */
|
||||
SANE_FIX (100.0), /* Size of scan area in TA mode in mm (x) */
|
||||
SANE_FIX (100.0), /* Size of scan area in TA mode in mm (y) */
|
||||
|
||||
SANE_FIX (0.0), /* Start of white strip in TA mode in mm (y) */
|
||||
|
||||
0, 8, 16, /* RGB CCD Line-distance correction in pixel */
|
||||
|
||||
COLOR_ORDER_BGR, /* Order of the CCD/CIS colors */
|
||||
|
||||
SANE_FALSE, /* Is this a CIS scanner? */
|
||||
CCD_ST12,
|
||||
DAC_WOLFSON_ST12,
|
||||
GPO_ST12,
|
||||
MOTOR_UMAX,
|
||||
GENESYS_FLAG_UNTESTED | GENESYS_FLAG_14BIT_GAMMA, /* Which flags are needed for this scanner? */
|
||||
20,
|
||||
200
|
||||
};
|
||||
|
||||
static Genesys_Model plustek_st24_model = {
|
||||
"plustek-opticpro-st24", /* Name */
|
||||
"Plustek", /* Device vendor string */
|
||||
"OpticPro ST24", /* Device model name */
|
||||
GENESYS_GL646,
|
||||
NULL,
|
||||
|
||||
{1200, 600, 300, 150, 75, 0}, /* possible x-resolutions */
|
||||
{2400, 1200, 600, 300, 150, 75, 0}, /* possible y-resolutions */
|
||||
{16, 8, 0}, /* possible depths in gray mode */
|
||||
{16, 8, 0}, /* possible depths in color mode */
|
||||
|
||||
SANE_FIX (3.5), /* Start of scan area in mm (x) */
|
||||
SANE_FIX (7.5), /* Start of scan area in mm (y) */
|
||||
SANE_FIX (218.0), /* Size of scan area in mm (x) */
|
||||
SANE_FIX (299.0), /* Size of scan area in mm (y) */
|
||||
|
||||
SANE_FIX (0.0), /* Start of white strip in mm (y) */
|
||||
SANE_FIX (1.0), /* Start of black mark in mm (x) */
|
||||
|
||||
SANE_FIX (0.0), /* Start of scan area in TA mode in mm (x) */
|
||||
SANE_FIX (0.0), /* Start of scan area in TA mode in mm (y) */
|
||||
SANE_FIX (100.0), /* Size of scan area in TA mode in mm (x) */
|
||||
SANE_FIX (100.0), /* Size of scan area in TA mode in mm (y) */
|
||||
|
||||
SANE_FIX (0.0), /* Start of white strip in TA mode in mm (y) */
|
||||
|
||||
0, 8, 16, /* RGB CCD Line-distance correction in pixel */
|
||||
|
||||
COLOR_ORDER_BGR, /* Order of the CCD/CIS colors */
|
||||
|
||||
SANE_FALSE, /* Is this a CIS scanner? */
|
||||
CCD_ST24,
|
||||
DAC_WOLFSON_ST24,
|
||||
GPO_ST24,
|
||||
MOTOR_ST24,
|
||||
GENESYS_FLAG_UNTESTED
|
||||
| GENESYS_FLAG_14BIT_GAMMA
|
||||
| GENESYS_FLAG_LAZY_INIT
|
||||
| GENESYS_FLAG_USE_PARK
|
||||
| GENESYS_FLAG_SKIP_WARMUP
|
||||
| GENESYS_FLAG_SEARCH_START | GENESYS_FLAG_OFFSET_CALIBRATION,
|
||||
20,
|
||||
200
|
||||
};
|
||||
|
||||
static Genesys_Model medion_md5345_model = {
|
||||
"medion-md5345-model", /* Name */
|
||||
"Medion", /* Device vendor string */
|
||||
"MD5345/MD6228/MD6471", /* Device model name */
|
||||
GENESYS_GL646,
|
||||
NULL,
|
||||
|
||||
{1200, 600, 300, 200, 150, 100, 75, 50, 0}, /* possible x-resolutions */
|
||||
{2400, 1200, 600, 500, 400, 300, 250, 200, 150, 100, 50, 0}, /* possible y-resolutions */
|
||||
{16, 8, 0}, /* possible depths in gray mode */
|
||||
{16, 8, 0}, /* possible depths in color mode */
|
||||
|
||||
SANE_FIX (1.00), /* Start of scan area in mm (x) */
|
||||
SANE_FIX (5.00), /* 2.79 < Start of scan area in mm (y) */
|
||||
SANE_FIX (215.9), /* Size of scan area in mm (x) */
|
||||
SANE_FIX (296.4), /* Size of scan area in mm (y) */
|
||||
|
||||
SANE_FIX (0.00), /* Start of white strip in mm (y) */
|
||||
SANE_FIX (0.00), /* Start of black mark in mm (x) */
|
||||
|
||||
SANE_FIX (0.00), /* Start of scan area in TA mode in mm (x) */
|
||||
SANE_FIX (0.00), /* Start of scan area in TA mode in mm (y) */
|
||||
SANE_FIX (0.00), /* Size of scan area in TA mode in mm (x) */
|
||||
SANE_FIX (0.00), /* Size of scan area in TA mode in mm (y) */
|
||||
|
||||
SANE_FIX (0.00), /* Start of white strip in TA mode in mm (y) */
|
||||
|
||||
48, 24, 0, /* RGB CCD Line-distance correction in pixel */
|
||||
|
||||
COLOR_ORDER_RGB, /* Order of the CCD/CIS colors */
|
||||
|
||||
SANE_FALSE, /* Is this a CIS scanner? */
|
||||
CCD_5345,
|
||||
DAC_WOLFSON_5345,
|
||||
GPO_5345,
|
||||
MOTOR_5345,
|
||||
GENESYS_FLAG_14BIT_GAMMA
|
||||
| GENESYS_FLAG_LAZY_INIT
|
||||
| GENESYS_FLAG_USE_PARK
|
||||
| GENESYS_FLAG_SKIP_WARMUP
|
||||
| GENESYS_FLAG_SEARCH_START
|
||||
| GENESYS_FLAG_DARK_CALIBRATION
|
||||
| GENESYS_FLAG_STAGGERED_LINE | GENESYS_FLAG_OFFSET_CALIBRATION,
|
||||
32,
|
||||
200
|
||||
};
|
||||
|
||||
static Genesys_USB_Device_Entry genesys_usb_device_list[] = {
|
||||
{0x0638, 0x0a10, &umax_astra_4500_model},
|
||||
{0x04a9, 0x2213, &canon_lide_50_model},
|
||||
{0x03f0, 0x0901, &hp2300c_model},
|
||||
{0x03f0, 0x0a01, &hp2400c_model},
|
||||
{0x03f0, 0x1405, &hp3670c_model},
|
||||
{0x07b3, 0x0600, &plustek_st12_model},
|
||||
{0x07b3, 0x0601, &plustek_st24_model},
|
||||
{0x0461, 0x0377, &medion_md5345_model},
|
||||
{0, 0, NULL}
|
||||
};
|
Plik diff jest za duży
Load Diff
Plik diff jest za duży
Load Diff
|
@ -0,0 +1,536 @@
|
|||
/* sane - Scanner Access Now Easy.
|
||||
|
||||
Copyright (C) 2003 Oliver Rauch
|
||||
Copyright (C) 2003, 2004 Henning Meier-Geinitz <henning@meier-geinitz.de>
|
||||
Copyright (C) 2004, 2005 Gerhard Jaeger <gerhard@gjaeger.de>
|
||||
Copyright (C) 2004, 2005 Stephane Voltz <stephane.voltz@numericable.fr>
|
||||
Parts of the structs have been taken from the gt68xx backend by
|
||||
Sergey Vlasov <vsu@altlinux.ru> et al.
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
#ifndef GENESYS_LOW_H
|
||||
#define GENESYS_LOW_H
|
||||
|
||||
#include <stddef.h>
|
||||
#include "../include/sane/sane.h"
|
||||
|
||||
#define DBG_error0 0 /* errors/warnings printed even with devuglevel 0 */
|
||||
#define DBG_error 1 /* fatal errors */
|
||||
#define DBG_init 2 /* initialization and scanning time messages */
|
||||
#define DBG_warn 3 /* warnings and non-fatal errors */
|
||||
#define DBG_info 4 /* informational messages */
|
||||
#define DBG_proc 5 /* starting/finishing functions */
|
||||
#define DBG_io 6 /* io functions */
|
||||
#define DBG_io2 7 /* io functions that are called very often */
|
||||
#define DBG_data 8 /* log image data */
|
||||
|
||||
#define RIE(function) \
|
||||
do { status = function; \
|
||||
if (status != SANE_STATUS_GOOD) return status; \
|
||||
} while (SANE_FALSE)
|
||||
|
||||
#define MM_PER_INCH 25.4
|
||||
|
||||
/* Flags */
|
||||
#define GENESYS_FLAG_UNTESTED (1 << 0) /* Print a warning for these scanners */
|
||||
#define GENESYS_FLAG_14BIT_GAMMA (1 << 1) /* use 14bit Gamma table instead of 12 */
|
||||
#define GENESYS_FLAG_LAZY_INIT (1 << 2) /* skip extensive ASIC test at init */
|
||||
#define GENESYS_FLAG_USE_PARK (1 << 3) /* use genesys_park_head() instead of
|
||||
genesys_slow_back_home() */
|
||||
#define GENESYS_FLAG_SKIP_WARMUP (1 << 4) /* skip genesys_warmup() */
|
||||
#define GENESYS_FLAG_OFFSET_CALIBRATION (1 << 5) /* do offset calibration */
|
||||
#define GENESYS_FLAG_SEARCH_START (1 << 6) /* do start search beofre scanning */
|
||||
#define GENESYS_FLAG_REPARK (1 << 7) /* repark head (and check for lock) by
|
||||
moving without scanning */
|
||||
#define GENESYS_FLAG_DARK_CALIBRATION (1 << 8) /* do dark calibration */
|
||||
#define GENESYS_FLAG_STAGGERED_LINE (1 << 9) /* pixel columns are shifted vertically for hi-res modes */
|
||||
|
||||
#define GENESYS_FLAG_MUST_WAIT (1 << 10) /* tells wether the scanner should wait 1 minute after init
|
||||
before doing anything */
|
||||
|
||||
/* USB control message values */
|
||||
#define REQUEST_TYPE_IN (USB_TYPE_VENDOR | USB_DIR_IN)
|
||||
#define REQUEST_TYPE_OUT (USB_TYPE_VENDOR | USB_DIR_OUT)
|
||||
#define REQUEST_REGISTER 0x0c
|
||||
#define REQUEST_BUFFER 0x04
|
||||
#define VALUE_BUFFER 0x82
|
||||
#define VALUE_SET_REGISTER 0x83
|
||||
#define VALUE_READ_REGISTER 0x84
|
||||
#define VALUE_WRITE_REGISTER 0x85
|
||||
#define VALUE_INIT 0x87
|
||||
#define GPIO_OUTPUT_ENABLE 0x89
|
||||
#define GPIO_READ 0x8a
|
||||
#define GPIO_WRITE 0x8b
|
||||
#define INDEX 0x00
|
||||
|
||||
/* todo: used?
|
||||
#define VALUE_READ_STATUS 0x86
|
||||
#define VALUE_BUF_ENDACCESS 0x8C
|
||||
*/
|
||||
|
||||
/* Read/write bulk data/registers */
|
||||
#define BULK_OUT 0x01
|
||||
#define BULK_IN 0x00
|
||||
#define BULK_RAM 0x00
|
||||
#define BULK_REGISTER 0x11
|
||||
|
||||
#define BULKIN_MAXSIZE 0xFFC0
|
||||
#define BULKOUT_MAXSIZE 0xF000
|
||||
|
||||
/* AFE values */
|
||||
#define AFE_INIT 1
|
||||
#define AFE_SET 2
|
||||
#define AFE_POWER_SAVE 4
|
||||
|
||||
#define LOWORD(x) ((u_int16_t)(x & 0xffff))
|
||||
#define HIWORD(x) ((u_int16_t)(x >> 16))
|
||||
#define LOBYTE(x) ((u_int8_t)((x) & 0xFF))
|
||||
#define HIBYTE(x) ((u_int8_t)((x) >> 8))
|
||||
|
||||
/* Global constants */
|
||||
/* todo: check if those are the same for every scanner */
|
||||
#define SYSTEM_CLOCK 32 /* todo: ? */
|
||||
#define MOTOR_SPEED_MAX 350
|
||||
/*#define MOTOR_GEAR *//*600 1200 * todo: base y res? --> model */
|
||||
#define PIXEL_TIME ((double) 24 / SYSTEM_CLOCK)
|
||||
#define DARK_VALUE 0
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
SANE_Byte address;
|
||||
SANE_Byte value;
|
||||
} Genesys_Register_Set;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
u_int8_t reg[4];
|
||||
u_int8_t sign[3];
|
||||
u_int8_t offset[3];
|
||||
u_int8_t gain[3];
|
||||
} Genesys_Frontend;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int optical_res;
|
||||
int black_pixels;
|
||||
int dummy_pixel;
|
||||
int CCD_start_xoffset; /* last pixel of CCD margin at optical resolution */
|
||||
int sensor_pixels; /* total pixels used by the sensor */
|
||||
int fau_gain_white_ref; /* TA CCD target code (reference gain) */
|
||||
int gain_white_ref; /* CCD target code (reference gain) */
|
||||
u_int8_t regs_0x08_0x0b[4];
|
||||
u_int8_t regs_0x10_0x1d[14];
|
||||
u_int8_t regs_0x52_0x5e[13];
|
||||
float red_gamma;
|
||||
float green_gamma;
|
||||
float blue_gamma;
|
||||
u_int16_t *red_gamma_table;
|
||||
u_int16_t *green_gamma_table;
|
||||
u_int16_t *blue_gamma_table;
|
||||
} Genesys_Sensor;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
u_int8_t value[2];
|
||||
u_int8_t enable[2];
|
||||
} Genesys_Gpo;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
SANE_Int base_ydpi; /* motor base steps */
|
||||
SANE_Int optical_ydpi; /* maximum resolution in y-direction */
|
||||
} Genesys_Motor;
|
||||
|
||||
typedef enum Genesys_Color_Order
|
||||
{
|
||||
COLOR_ORDER_RGB,
|
||||
COLOR_ORDER_BGR
|
||||
}
|
||||
Genesys_Color_Order;
|
||||
|
||||
|
||||
#define MAX_SCANNERS 30
|
||||
#define MAX_RESOLUTIONS 13
|
||||
#define MAX_DPI 4
|
||||
|
||||
#define GENESYS_GL646 646
|
||||
#define GENESYS_GL841 841
|
||||
|
||||
#define GENESYS_MAX_REGS 135
|
||||
|
||||
#define DAC_WOLFSON_UMAX 0
|
||||
#define DAC_WOLFSON_ST12 1
|
||||
#define DAC_WOLFSON_ST24 2
|
||||
#define DAC_WOLFSON_5345 3
|
||||
#define DAC_WOLFSON_HP2400 4
|
||||
#define DAC_WOLFSON_HP2300 5
|
||||
|
||||
#define CCD_UMAX 0
|
||||
#define CCD_ST12 1 /* SONY ILX548: 5340 Pixel ??? */
|
||||
#define CCD_ST24 2 /* SONY ILX569: 10680 Pixel ??? */
|
||||
#define CCD_5345 3
|
||||
#define CCD_HP2400 4
|
||||
#define CCD_HP2300 5
|
||||
|
||||
#define GPO_UMAX 0
|
||||
#define GPO_ST12 1
|
||||
#define GPO_ST24 2
|
||||
#define GPO_5345 3
|
||||
#define GPO_HP2400 4
|
||||
#define GPO_HP2300 5
|
||||
|
||||
#define MOTOR_UMAX 0
|
||||
#define MOTOR_5345 1
|
||||
#define MOTOR_ST24 2
|
||||
#define MOTOR_HP2400 3
|
||||
#define MOTOR_HP2300 4
|
||||
|
||||
|
||||
/* Forward typedefs */
|
||||
typedef struct Genesys_Device Genesys_Device;
|
||||
|
||||
/**
|
||||
* Scanner command set description.
|
||||
*
|
||||
* This description contains parts which are common to all scanners with the
|
||||
* same command set, but may have different optical resolution and other
|
||||
* parameters.
|
||||
*/
|
||||
typedef struct Genesys_Command_Set
|
||||
{
|
||||
/** @name Identification */
|
||||
/*@{ */
|
||||
|
||||
/** Name of this command set */
|
||||
SANE_String_Const name;
|
||||
|
||||
/*@} */
|
||||
|
||||
/** For ASIC initialization */
|
||||
SANE_Status (*init) (Genesys_Device * dev);
|
||||
|
||||
SANE_Status (*init_regs_for_warmup) (Genesys_Device * dev,
|
||||
Genesys_Register_Set * regs,
|
||||
int *channels, int *total_size);
|
||||
SANE_Status (*init_regs_for_coarse_calibration) (Genesys_Device * dev);
|
||||
SANE_Status (*init_regs_for_shading) (Genesys_Device * dev);
|
||||
SANE_Status (*init_regs_for_scan) (Genesys_Device * dev);
|
||||
|
||||
SANE_Bool (*get_filter_bit) (Genesys_Register_Set * reg);
|
||||
SANE_Bool (*get_lineart_bit) (Genesys_Register_Set * reg);
|
||||
SANE_Bool (*get_bitset_bit) (Genesys_Register_Set * reg);
|
||||
SANE_Bool (*get_gain4_bit) (Genesys_Register_Set * reg);
|
||||
SANE_Bool (*get_fast_feed_bit) (Genesys_Register_Set * reg);
|
||||
|
||||
SANE_Bool (*test_buffer_empty_bit) (SANE_Byte val);
|
||||
SANE_Bool (*test_motor_flag_bit) (SANE_Byte val);
|
||||
|
||||
int (*bulk_full_size) (void);
|
||||
|
||||
SANE_Status (*set_fe) (Genesys_Device * dev, u_int8_t set);
|
||||
SANE_Status (*set_powersaving) (Genesys_Device * dev, int delay);
|
||||
|
||||
void (*set_motor_power) (Genesys_Register_Set * regs, SANE_Bool set);
|
||||
void (*set_lamp_power) (Genesys_Register_Set * regs, SANE_Bool set);
|
||||
|
||||
SANE_Status (*begin_scan) (Genesys_Device * dev,
|
||||
Genesys_Register_Set * regs,
|
||||
SANE_Bool start_motor);
|
||||
SANE_Status (*end_scan) (Genesys_Device * dev,
|
||||
Genesys_Register_Set * regs,
|
||||
SANE_Bool check_stop);
|
||||
|
||||
SANE_Status (*send_gamma_table) (Genesys_Device * dev, SANE_Bool generic);
|
||||
SANE_Status (*send_slope_table) (Genesys_Device * dev, int table_nr,
|
||||
u_int16_t * slope_table, int steps);
|
||||
|
||||
SANE_Status (*search_start_position) (Genesys_Device * dev);
|
||||
SANE_Status (*offset_calibration) (Genesys_Device * dev);
|
||||
SANE_Status (*coarse_gain_calibration) (Genesys_Device * dev, int dpi);
|
||||
|
||||
SANE_Status (*slow_back_home) (Genesys_Device * dev,
|
||||
SANE_Bool wait_until_home);
|
||||
SANE_Status (*park_head) (Genesys_Device * dev,
|
||||
Genesys_Register_Set * reg,
|
||||
SANE_Bool wait_until_home);
|
||||
|
||||
} Genesys_Command_Set;
|
||||
|
||||
typedef struct Genesys_Model
|
||||
{
|
||||
SANE_String_Const name;
|
||||
SANE_String_Const vendor;
|
||||
SANE_String_Const model;
|
||||
|
||||
SANE_Int asic_type; /* ASIC type gl646 or gl841 */
|
||||
Genesys_Command_Set *cmd_set; /* pointers to low level functions */
|
||||
|
||||
SANE_Int xdpi_values[MAX_RESOLUTIONS]; /* possible x resolutions */
|
||||
SANE_Int ydpi_values[MAX_RESOLUTIONS]; /* possible y resolutions */
|
||||
SANE_Int bpp_gray_values[MAX_DPI]; /* possible depths in gray mode */
|
||||
SANE_Int bpp_color_values[MAX_DPI]; /* possible depths in color mode */
|
||||
|
||||
SANE_Fixed x_offset; /* Start of scan area in mm */
|
||||
SANE_Fixed y_offset; /* Start of scan area in mm */
|
||||
SANE_Fixed x_size; /* Size of scan area in mm */
|
||||
SANE_Fixed y_size; /* Size of scan area in mm */
|
||||
|
||||
SANE_Fixed y_offset_calib; /* Start of white strip in mm */
|
||||
SANE_Fixed x_offset_mark; /* Start of black mark in mm */
|
||||
|
||||
SANE_Fixed x_offset_ta; /* Start of scan area in TA mode in mm */
|
||||
SANE_Fixed y_offset_ta; /* Start of scan area in TA mode in mm */
|
||||
SANE_Fixed x_size_ta; /* Size of scan area in TA mode in mm */
|
||||
SANE_Fixed y_size_ta; /* Size of scan area in TA mode in mm */
|
||||
|
||||
SANE_Fixed y_offset_calib_ta; /* Start of white strip in TA mode in mm */
|
||||
|
||||
/* Line-distance correction (in pixel at optical_ydpi) for CCD scanners */
|
||||
SANE_Int ld_shift_r; /* red */
|
||||
SANE_Int ld_shift_g; /* green */
|
||||
SANE_Int ld_shift_b; /* blue */
|
||||
|
||||
Genesys_Color_Order line_mode_color_order; /* Order of the CCD/CIS colors */
|
||||
|
||||
SANE_Bool is_cis; /* Is this a CIS or CCD scanner? */
|
||||
|
||||
SANE_Int ccd_type; /* which SENSOR type do we have ? */
|
||||
SANE_Int dac_type; /* which DAC do we have ? */
|
||||
SANE_Int gpo_type; /* General purpose output type */
|
||||
SANE_Int motor_type; /* stepper motor type */
|
||||
SANE_Word flags; /* Which hacks are needed for this scanner? */
|
||||
/*@} */
|
||||
SANE_Int shading_lines; /* how many lines are used for shading calibration */
|
||||
SANE_Int search_lines; /* how many lines are used to search start position */
|
||||
} Genesys_Model;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int scan_method; /* todo: change >=2: Transparency, 0x88: negative film */
|
||||
int scan_mode; /* todo: change 0,1 = lineart, halftone; 2 = gray, 3 = 3pass color, 4=single pass color */
|
||||
int xres; /* dpi */
|
||||
int yres; /* dpi */
|
||||
|
||||
double tl_x; /* x start on scan table in mm */
|
||||
double tl_y; /* y start on scan table in mm */
|
||||
|
||||
int lines; /* number of lines at scan resolution */
|
||||
int pixels; /* number of pixels at scan resolution */
|
||||
|
||||
int depth; /* bit depth of the scan */
|
||||
|
||||
/* todo : remove these fields ? */
|
||||
int exposure_time;
|
||||
|
||||
int color_filter; /* todo: check, may be make it an advanced option */
|
||||
} Genesys_Settings;
|
||||
|
||||
|
||||
struct Genesys_Device
|
||||
{
|
||||
SANE_Int dn;
|
||||
SANE_String file_name;
|
||||
Genesys_Model *model;
|
||||
|
||||
Genesys_Register_Set reg[GENESYS_MAX_REGS];
|
||||
Genesys_Register_Set calib_reg[GENESYS_MAX_REGS];
|
||||
Genesys_Settings settings;
|
||||
Genesys_Frontend frontend;
|
||||
Genesys_Sensor sensor;
|
||||
Genesys_Gpo gpo;
|
||||
Genesys_Motor motor;
|
||||
u_int16_t slope_table0[256];
|
||||
u_int16_t slope_table1[256];
|
||||
time_t init_date;
|
||||
|
||||
u_int8_t *white_average_data;
|
||||
u_int8_t *dark_average_data;
|
||||
u_int16_t dark[3];
|
||||
|
||||
SANE_Bool already_initialized;
|
||||
SANE_Int scanhead_position_in_steps;
|
||||
SANE_Int lamp_off_time;
|
||||
|
||||
SANE_Bool read_active;
|
||||
SANE_Byte *read_buffer;
|
||||
SANE_Byte *resize_buffer;
|
||||
size_t words_per_line;
|
||||
float read_factor; /* line shrinking factor */
|
||||
size_t requested_buffer_size;
|
||||
size_t read_buffer_size;
|
||||
size_t read_pos; /* current position in data buffer */
|
||||
size_t read_bytes_in_buffer; /* data bytes currently in buffer */
|
||||
size_t read_bytes_left; /* bytes to read from scanner */
|
||||
size_t total_bytes_read; /* total bytes read sent to frontend */
|
||||
size_t bytes_to_read; /* total bytes read to be sent to frontend */
|
||||
SANE_Int max_shift; /* maximum line number that has to be read
|
||||
to enable data reordering */
|
||||
SANE_Int stagger; /* numbre of scan lines needed to process
|
||||
staggering effect */
|
||||
|
||||
|
||||
struct Genesys_Device *next;
|
||||
};
|
||||
|
||||
typedef struct Genesys_USB_Device_Entry
|
||||
{
|
||||
SANE_Word vendor; /**< USB vendor identifier */
|
||||
SANE_Word product; /**< USB product identifier */
|
||||
Genesys_Model *model; /**< Scanner model information */
|
||||
} Genesys_USB_Device_Entry;
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
/* common functions needed by low level specific functions */
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
extern Genesys_Register_Set *sanei_genesys_get_address (Genesys_Register_Set *
|
||||
regs, SANE_Byte addr);
|
||||
|
||||
extern SANE_Byte
|
||||
sanei_genesys_read_reg_from_set (Genesys_Register_Set * regs,
|
||||
SANE_Byte address);
|
||||
|
||||
extern void
|
||||
sanei_genesys_set_reg_from_set (Genesys_Register_Set * regs,
|
||||
SANE_Byte address, SANE_Byte value);
|
||||
|
||||
extern SANE_Status
|
||||
sanei_genesys_read_register (Genesys_Device * dev, u_int8_t reg,
|
||||
u_int8_t * val);
|
||||
|
||||
extern SANE_Status
|
||||
sanei_genesys_write_register (Genesys_Device * dev, u_int8_t reg,
|
||||
u_int8_t val);
|
||||
|
||||
extern SANE_Status
|
||||
sanei_genesys_get_status (Genesys_Device * dev, u_int8_t * status);
|
||||
|
||||
extern void sanei_genesys_init_fe (Genesys_Device * dev);
|
||||
|
||||
extern void sanei_genesys_init_structs (Genesys_Device * dev);
|
||||
|
||||
extern SANE_Status
|
||||
sanei_genesys_init_shading_data (Genesys_Device * dev, int pixels_per_line);
|
||||
|
||||
extern SANE_Status sanei_genesys_read_feed_steps (Genesys_Device * dev,
|
||||
int *steps);
|
||||
|
||||
extern void
|
||||
sanei_genesys_calculate_zmode2 (SANE_Bool two_table,
|
||||
u_int32_t exposure_time,
|
||||
u_int16_t * slope_table,
|
||||
int reg21,
|
||||
int move, int reg22, u_int32_t * z1,
|
||||
u_int32_t * z2);
|
||||
|
||||
extern void
|
||||
sanei_genesys_calculate_zmode (Genesys_Device * dev,
|
||||
u_int32_t exposure_time,
|
||||
u_int32_t steps_sum,
|
||||
u_int16_t last_speed, u_int32_t feedl,
|
||||
u_int8_t fastfed, u_int8_t scanfed,
|
||||
u_int8_t fwdstep, u_int8_t tgtime,
|
||||
u_int32_t * z1, u_int32_t * z2);
|
||||
|
||||
extern SANE_Status
|
||||
sanei_genesys_bulk_write_data (Genesys_Device * dev, u_int8_t addr,
|
||||
u_int8_t * data, size_t len);
|
||||
|
||||
extern SANE_Status
|
||||
sanei_genesys_bulk_read_data (Genesys_Device * dev, u_int8_t addr,
|
||||
u_int8_t * data, size_t len);
|
||||
|
||||
extern SANE_Status
|
||||
sanei_genesys_set_buffer_address (Genesys_Device * dev, u_int32_t addr);
|
||||
|
||||
extern SANE_Status
|
||||
sanei_genesys_fe_write_data (Genesys_Device * dev, u_int8_t addr,
|
||||
u_int16_t data);
|
||||
|
||||
extern SANE_Int
|
||||
sanei_genesys_exposure_time (Genesys_Device * dev, Genesys_Register_Set * reg,
|
||||
int xdpi);
|
||||
|
||||
extern SANE_Int
|
||||
sanei_genesys_create_slope_table (Genesys_Device * dev,
|
||||
u_int16_t * slope_table, int steps,
|
||||
int step_type, int exposure_time,
|
||||
SANE_Bool same_speed, double yres);
|
||||
|
||||
extern void
|
||||
sanei_genesys_create_gamma_table (u_int16_t * gamma_table, float size,
|
||||
float maximum, float gamma_max,
|
||||
float gamma);
|
||||
|
||||
extern SANE_Status
|
||||
sanei_genesys_bulk_write_register (Genesys_Device * dev,
|
||||
Genesys_Register_Set * reg, size_t size);
|
||||
|
||||
extern SANE_Status sanei_genesys_start_motor (Genesys_Device * dev);
|
||||
|
||||
extern SANE_Status sanei_genesys_stop_motor (Genesys_Device * dev);
|
||||
|
||||
extern SANE_Status
|
||||
sanei_genesys_search_reference_point (Genesys_Device * dev, u_int8_t * data,
|
||||
int start_pixel, int dpi, int width,
|
||||
int height);
|
||||
|
||||
extern SANE_Status
|
||||
sanei_genesys_write_pnm_file (char *filename, u_int8_t * data, int depth,
|
||||
int channels, int pixels_per_line, int lines);
|
||||
|
||||
extern SANE_Status
|
||||
sanei_genesys_test_buffer_empty (Genesys_Device * dev, SANE_Bool * empty);
|
||||
|
||||
extern SANE_Status
|
||||
sanei_genesys_read_data_from_scanner (Genesys_Device * dev, u_int8_t * data,
|
||||
size_t size);
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* ASIC specific functions declarations */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
extern SANE_Status sanei_gl646_init_cmd_set (Genesys_Device * dev);
|
||||
extern SANE_Status sanei_gl841_init_cmd_set (Genesys_Device * dev);
|
||||
|
||||
#endif /* not GENESYS_LOW_H */
|
|
@ -25785,7 +25785,7 @@ echo "$as_me: Manually selected backends: ${BACKENDS}" >&6;}
|
|||
else
|
||||
BACKENDS="abaton agfafocus apple artec as6e avision bh canon \
|
||||
canon630u coolscan coolscan2 dc25 dmc \
|
||||
epson fujitsu gt68xx hp leo matsushita microtek \
|
||||
epson fujitsu genesys gt68xx hp leo matsushita microtek \
|
||||
microtek2 mustek mustek_usb nec pie plustek \
|
||||
plustek_pp ricoh s9036 sceptre sharp \
|
||||
sp15c st400 tamarack test teco1 teco2 teco3 umax umax_pp umax1220u \
|
||||
|
|
|
@ -52,7 +52,7 @@ SECT5 = sane-abaton.5 sane-agfafocus.5 sane-apple.5 sane-as6e.5 sane-dll.5 \
|
|||
sane-teco1.5 sane-teco2.5 sane-teco3.5 sane-test.5 sane-sp15c.5 \
|
||||
sane-coolscan2.5 sane-hpsj5s.5 sane-gt68xx.5 sane-artec_eplus48u.5 \
|
||||
sane-ma1509.5 sane-ibm.5 sane-hp5400.5 sane-plustek_pp.5 sane-u12.5 \
|
||||
sane-niash.5 sane-sm3840.5
|
||||
sane-niash.5 sane-sm3840.5 sane-genesys.5
|
||||
SECT7 = sane.7
|
||||
SECT8 = saned.8
|
||||
MANPAGES = $(SECT1) $(SECT5) $(SECT7) $(SECT8)
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
:backend "genesys"
|
||||
:version "1.0"
|
||||
:manpage "sane-genesys"
|
||||
:comment "Only the USB scanners mentioned below are currently supported."
|
||||
:devicetype :scanner
|
||||
|
||||
; -----------------------------------------------------------------------------
|
||||
|
||||
:mfg "Medion"
|
||||
:url "http://www.medion.com/"
|
||||
|
||||
:model "MD5345"
|
||||
:status :good
|
||||
:interface "USB"
|
||||
:comment "Has a Primax USB ID"
|
||||
|
||||
:model "MD6228"
|
||||
:status :good
|
||||
:interface "USB"
|
||||
:comment "Has a Primax USB ID. Same as MD5345"
|
||||
|
||||
:model "MD6471"
|
||||
:status :complete
|
||||
:interface "USB"
|
||||
:comment "Has a Primax USB ID. Same as MD5345"
|
||||
|
||||
; -----------------------------------------------------------------------------
|
||||
|
||||
:mfg "Hewlett-Packard"
|
||||
:model "HP2300C"
|
||||
:status :complete
|
||||
:interface "USB"
|
||||
:comment "600x1200 dpi max"
|
||||
|
||||
; -----------------------------------------------------------------------------
|
|
@ -109,6 +109,12 @@
|
|||
:status :unsupported
|
||||
:comment "Not supported. No chipset information available. Same as UMAX Astra 6700."
|
||||
|
||||
:model "iVina 1600"
|
||||
;:url ""
|
||||
:interface "USB"
|
||||
:status :unsupported
|
||||
:comment "GL646 based, to be added to genesys backend"
|
||||
|
||||
;********************************************************************************************
|
||||
|
||||
:mfg "Benq (Acer)"
|
||||
|
@ -262,6 +268,12 @@
|
|||
:status :unsupported
|
||||
:comment "Not supported. Vendor/product 0x4a9/0x2205. However, a stand-alone program for FreeBSD is available."
|
||||
|
||||
:model "CanoScan LiDE 50"
|
||||
;:url ""
|
||||
:interface "USB"
|
||||
:status :unsupported
|
||||
:comment "GL841 based, to be added to genesys backend"
|
||||
|
||||
:model "CanoScan LiDE 500F"
|
||||
:url "/unsupported/canon-canoscan-lide-500f.html"
|
||||
:interface "USB"
|
||||
|
@ -547,6 +559,18 @@
|
|||
:status :unsupported
|
||||
:comment "Not supported yet by SANE, but a backend is under development. See link for details."
|
||||
|
||||
:model "ScanJet 2400c"
|
||||
:interface "USB"
|
||||
;:url ""
|
||||
:status :unsupported
|
||||
:comment "GL646 based, to be added to genesys backend"
|
||||
|
||||
:model "ScanJet 3670c"
|
||||
:interface "USB"
|
||||
;:url ""
|
||||
:status :unsupported
|
||||
:comment "GL646 based, to be added to genesys backend"
|
||||
|
||||
:model "ScanJet 3770"
|
||||
:interface "USB"
|
||||
:url "/unsupported/hp-scanjet-3770.html"
|
||||
|
@ -1258,6 +1282,11 @@
|
|||
:status :unsupported
|
||||
:comment "Probably LM983x based."
|
||||
|
||||
:model "OpticPro ST24"
|
||||
:interface "USB"
|
||||
:status :unsupported
|
||||
:comment "GL646 based, to be added to genesys backend"
|
||||
|
||||
:model "OpticPro ST64"
|
||||
:interface "USB"
|
||||
:status :unsupported
|
||||
|
@ -1587,6 +1616,12 @@
|
|||
:status :unsupported
|
||||
:comment "Probably not supported. See link for details."
|
||||
|
||||
:model "Astra 4500"
|
||||
;:url ""
|
||||
:interface "USB"
|
||||
:status :unsupported
|
||||
:comment "GL646 based, to be added to genesys backend"
|
||||
|
||||
:model "Astra 4600"
|
||||
:interface "USB"
|
||||
:status :unsupported
|
||||
|
|
|
@ -0,0 +1,125 @@
|
|||
.\" .IX sane-genesys
|
||||
.TH "sane-genesys" "5" "3 June 2005" "@PACKAGEVERSION@" "SANE Scanner Access Now Easy"
|
||||
.SH "NAME"
|
||||
sane\-genesys \- SANE backend for GL646 and GL841 based USB flatbed scanners
|
||||
.SH "DESCRIPTION"
|
||||
The
|
||||
.B sane\-genesys
|
||||
library implements a SANE (Scanner Access Now Easy) backend that provides
|
||||
access to USB flatbed scanners based on the Genesys GL646 and GL841 chips.
|
||||
At present, the following scanners are known to work with this backend:
|
||||
.PP
|
||||
.RS
|
||||
Medion MD6228
|
||||
.br
|
||||
Medion MD6274
|
||||
.br
|
||||
Hewlett\-Packard HP2300C
|
||||
.RE
|
||||
|
||||
.PP
|
||||
This is BETA software. Especially if you test new or untested scanners, keep
|
||||
your hand at the scanner's plug and unplug it, if the head bumps at the end of
|
||||
the scan area.
|
||||
.PP
|
||||
If you own a scanner other than the ones listed above that works with this
|
||||
backend, please let me know this by sending the scanner's exact model name and
|
||||
the USB vendor and device ids (e.g. from
|
||||
.I /proc/bus/usb/devices ,
|
||||
.I sane\-find\-scanner
|
||||
or syslog) to the sane\-devel mailing list. Even if the scanner's name is only
|
||||
slightly different from the models mentioned above, please let me know.
|
||||
.PP
|
||||
If you own a scanner that isn't detected by the genesys backend but has a GL646
|
||||
or GL841 chipset, you can try to add it to the backend. Currently, there are no GL841
|
||||
based scanner functionnal.
|
||||
.PP
|
||||
.SH "SYSTEM ISSUES"
|
||||
This backend needs libusb\-0.1.6 or later installed, and hasn't tested in other
|
||||
configuration than a linux kernel 2.6.9 or higher. However, it should work any
|
||||
system with libusb where the SANE package can be compiled. For
|
||||
setting permissions and general USB information looks at
|
||||
.BR sane\-usb (5).
|
||||
|
||||
|
||||
.SH "CONFIGURATION"
|
||||
The contents of the
|
||||
.I genesys.conf
|
||||
file is a list of usb lines containing vendor and product ids that correspond
|
||||
to USB scanners. The file can also contain option lines. Empty lines and
|
||||
lines starting with a hash mark (#) are ignored. The scanners are
|
||||
autodetected by
|
||||
.B usb vendor_id product_id
|
||||
statements which are already included into
|
||||
.I genesys.conf .
|
||||
"vendor_id" and "product_id" are hexadecimal numbers that identfy the
|
||||
scanner.
|
||||
.PP
|
||||
|
||||
.SH "FILES"
|
||||
.TP
|
||||
.I @CONFIGDIR@/genesys.conf
|
||||
The backend configuration file (see also description of
|
||||
.B SANE_CONFIG_DIR
|
||||
below).
|
||||
.TP
|
||||
.I @LIBDIR@/libsane\-genesys.a
|
||||
The static library implementing this backend.
|
||||
.TP
|
||||
.I @LIBDIR@/libsane\-genesys.so
|
||||
The shared library implementing this backend (present on systems that
|
||||
support dynamic loading).
|
||||
.SH "ENVIRONMENT"
|
||||
.TP
|
||||
.B SANE_CONFIG_DIR
|
||||
This environment variable specifies the list of directories that may
|
||||
contain the configuration file. Under UNIX, the directories are
|
||||
separated by a colon (`:'), under OS/2, they are separated by a
|
||||
semi\-colon (`;'). If this variable is not set, the configuration file
|
||||
is searched in two default directories: first, the current working
|
||||
directory (".") and then in @CONFIGDIR@. If the value of the
|
||||
environment variable ends with the directory separator character, then
|
||||
the default directories are searched after the explicitly specified
|
||||
directories. For example, setting
|
||||
.B SANE_CONFIG_DIR
|
||||
to "/tmp/config:" would result in directories "tmp/config", ".", and
|
||||
"@CONFIGDIR@" being searched (in this order).
|
||||
.TP
|
||||
.B SANE_DEBUG_GENESYS
|
||||
If the library was compiled with debug support enabled, this environment
|
||||
variable controls the debug level for this backend. Higher debug levels
|
||||
increase the verbosity of the output. If the debug level is set to 1 or higher,
|
||||
some debug options become available that are normally hidden. Handle them with
|
||||
care. This will print messages related to core genesys functions.
|
||||
.B SANE_DEBUG_GENESYS_GL646
|
||||
This environment variable controls the debug level for the specific GL646 code
|
||||
part.
|
||||
|
||||
|
||||
|
||||
Example (full and highly verbose output):
|
||||
export SANE_DEBUG_GENESYS=255
|
||||
export SANE_DEBUG_GENESYS_GL646=255
|
||||
|
||||
.SH "SEE ALSO"
|
||||
.BR sane (7),
|
||||
.BR sane\-usb (5)
|
||||
.br
|
||||
|
||||
|
||||
.SH "AUTHOR"
|
||||
Oliver Rauch
|
||||
.br
|
||||
Henning Meier\-Geinitz <henning@meier\-geinitz.de>
|
||||
.br
|
||||
Gerhard Jaeger <gerhard@gjaeger.de>
|
||||
.br
|
||||
Stéphane Voltz <svoltz@numericable.fr>
|
||||
.br
|
||||
Philipp Schmid <philipp8288@web.de>
|
||||
.br
|
||||
|
||||
.SH "BUGS"
|
||||
Support for buttons is missing.
|
||||
.PP
|
||||
|
Ładowanie…
Reference in New Issue