📄 scanner.h
字号:
/* * Driver for USB Scanners (linux-2.4) * * Copyright (C) 1999, 2000, 2001, 2002 David E. Nelson * Previously maintained by Brian Beattie * * Current maintainer: Henning Meier-Geinitz <henning@meier-geinitz.de> * * 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., 675 Mass Ave, Cambridge, MA 02139, USA. * */ /* * For documentation, see Documentation/usb/scanner.txt. * Website: http://www.meier-geinitz.de/kernel/ * Please contact the maintainer if your scanner is not detected by this * driver automatically. */#include <linux/module.h>#include <linux/kernel.h>#include <linux/errno.h>#include <asm/uaccess.h>#include <linux/init.h>#include <linux/slab.h>#include <linux/delay.h>#include <linux/ioctl.h>#include <linux/sched.h>#include <linux/smp_lock.h>#include <linux/devfs_fs_kernel.h>#include <linux/usb_scanner_ioctl.h>// #define DEBUG#define DRIVER_VERSION "0.4.12"#define DRIVER_DESC "USB Scanner Driver"#include <linux/usb.h>static __s32 vendor=-1, product=-1, read_timeout=0;MODULE_AUTHOR("Henning Meier-Geinitz, henning@meier-geinitz.de");MODULE_DESCRIPTION(DRIVER_DESC" "DRIVER_VERSION);MODULE_LICENSE("GPL");MODULE_PARM(vendor, "i");MODULE_PARM_DESC(vendor, "User specified USB idVendor");MODULE_PARM(product, "i");MODULE_PARM_DESC(product, "User specified USB idProduct");MODULE_PARM(read_timeout, "i");MODULE_PARM_DESC(read_timeout, "User specified read timeout in seconds");/* WARNING: These DATA_DUMP's can produce a lot of data. Caveat Emptor. */// #define RD_DATA_DUMP /* Enable to dump data - limited to 24 bytes */// #define WR_DATA_DUMP /* DEBUG does not have to be defined. */static struct usb_device_id scanner_device_ids [] = { /* Acer (now Benq) */ { USB_DEVICE(0x04a5, 0x1a20) }, /* Unknown - Oliver Schwartz */ { USB_DEVICE(0x04a5, 0x1a2a) }, /* Another 620U */ { USB_DEVICE(0x04a5, 0x2022) }, /* 340U */ { USB_DEVICE(0x04a5, 0x2040) }, /* 620U (!) */ { USB_DEVICE(0x04a5, 0x2060) }, /* 620U & 640U (!)*/ { USB_DEVICE(0x04a5, 0x207e) }, /* 640BU */ { USB_DEVICE(0x04a5, 0x20b0) }, /* Benq 4300 */ { USB_DEVICE(0x04a5, 0x20be) }, /* Unknown - Oliver Schwartz */ { USB_DEVICE(0x04a5, 0x20c0) }, /* 1240UT, 1240U */ { USB_DEVICE(0x04a5, 0x20de) }, /* S2W 3300U */ { USB_DEVICE(0x04a5, 0x20fc) }, /* Benq 5000 */ { USB_DEVICE(0x04a5, 0x20fe) }, /* Benq 5300 */ /* Agfa */ { USB_DEVICE(0x06bd, 0x0001) }, /* SnapScan 1212U */ { USB_DEVICE(0x06bd, 0x0002) }, /* SnapScan 1236U */ { USB_DEVICE(0x06bd, 0x0100) }, /* SnapScan Touch */ { USB_DEVICE(0x06bd, 0x2061) }, /* Another SnapScan 1212U (?)*/ { USB_DEVICE(0x06bd, 0x208d) }, /* Snapscan e40 */ { USB_DEVICE(0x06bd, 0x208f) }, /* SnapScan e50*/ { USB_DEVICE(0x06bd, 0x2091) }, /* SnapScan e20 */ { USB_DEVICE(0x06bd, 0x2093) }, /* SnapScan e10*/ { USB_DEVICE(0x06bd, 0x2095) }, /* SnapScan e25 */ { USB_DEVICE(0x06bd, 0x2097) }, /* SnapScan e26 */ { USB_DEVICE(0x06bd, 0x20fd) }, /* SnapScan e52*/ { USB_DEVICE(0x06bd, 0x20ff) }, /* SnapScan e42*/ /* Artec */ { USB_DEVICE(0x05d8, 0x4001) }, /* Ultima 2000 */ { USB_DEVICE(0x05d8, 0x4002) }, /* Ultima 2000 (GT6801 based) */ { USB_DEVICE(0x05d8, 0x4003) }, /* E+ 48U */ { USB_DEVICE(0x05d8, 0x4004) }, /* E+ Pro */ /* Avision */ { USB_DEVICE(0x0638, 0x0a10) }, /* iVina FB1600 (=Umax Astra 4500) */ /* Benq: see Acer */ /* Brother */ { USB_DEVICE(0x04f9, 0x010f) }, /* MFC 5100C */ { USB_DEVICE(0x04f9, 0x0111) }, /* MFC 6800 */ /* Canon */ { USB_DEVICE(0x04a9, 0x2201) }, /* CanoScan FB320U */ { USB_DEVICE(0x04a9, 0x2202) }, /* CanoScan FB620U */ { USB_DEVICE(0x04a9, 0x2204) }, /* CanoScan FB630U/FB636U */ { USB_DEVICE(0x04a9, 0x2205) }, /* CanoScan FB1210U */ { USB_DEVICE(0x04a9, 0x2206) }, /* CanoScan N650U/N656U */ { USB_DEVICE(0x04a9, 0x2207) }, /* CanoScan N1220U */ { USB_DEVICE(0x04a9, 0x2208) }, /* CanoScan D660U */ { USB_DEVICE(0x04a9, 0x220b) }, /* CanoScan D646U */ { USB_DEVICE(0x04a9, 0x220c) }, /* CanoScan D1250U2 */ { USB_DEVICE(0x04a9, 0x220d) }, /* CanoScan N670U/N676U/LIDE 20 */ { USB_DEVICE(0x04a9, 0x220e) }, /* CanoScan N1240U/LIDE 30 */ { USB_DEVICE(0x04a9, 0x2213) }, /* LIDE 50 */ { USB_DEVICE(0x04a9, 0x3042) }, /* FS4000US */ /* Colorado -- See Primax/Colorado below */ /* Compaq */ { USB_DEVICE(0x049f, 0x001a) }, /* S4 100 */ { USB_DEVICE(0x049f, 0x0021) }, /* S200 */ /* Epson -- See Seiko/Epson below */ /* Fujitsu */ { USB_DEVICE(0x04c5, 0x1041) }, /* fi-4220c USB/SCSI info:mza@mu-tec.de */ { USB_DEVICE(0x04c5, 0x1042) }, /* fi-4120c USB/SCSI info:mza@mu-tec.de */ { USB_DEVICE(0x04c5, 0x1029) }, /* fi-4010c USB AVision info:mza@mu-tec.de */ /* Genius */ { USB_DEVICE(0x0458, 0x2001) }, /* ColorPage Vivid Pro */ { USB_DEVICE(0x0458, 0x2007) }, /* ColorPage HR6 V2 */ { USB_DEVICE(0x0458, 0x2008) }, /* ColorPage HR6 V2 */ { USB_DEVICE(0x0458, 0x2009) }, /* ColorPage HR6A */ { USB_DEVICE(0x0458, 0x2011) }, /* ColorPage Vivid3x */ { USB_DEVICE(0x0458, 0x2013) }, /* ColorPage HR7 */ { USB_DEVICE(0x0458, 0x2015) }, /* ColorPage HR7LE */ { USB_DEVICE(0x0458, 0x2016) }, /* ColorPage HR6X */ /* Hewlett Packard */ { USB_DEVICE(0x03f0, 0x0101) }, /* ScanJet 4100C */ { USB_DEVICE(0x03f0, 0x0102) }, /* PhotoSmart S20 */ { USB_DEVICE(0x03f0, 0x0105) }, /* ScanJet 4200C */ { USB_DEVICE(0x03f0, 0x0201) }, /* ScanJet 6200C */ { USB_DEVICE(0x03f0, 0x0205) }, /* ScanJet 3300C */ { USB_DEVICE(0x03f0, 0x0305) }, /* ScanJet 4300C */ { USB_DEVICE(0x03f0, 0x0401) }, /* ScanJet 5200C */ { USB_DEVICE(0x03f0, 0x0405) }, /* ScanJet 3400C */ { USB_DEVICE(0x03f0, 0x0505) }, /* ScanJet 2100C */ { USB_DEVICE(0x03f0, 0x0601) }, /* ScanJet 6300C */ { USB_DEVICE(0x03f0, 0x0605) }, /* ScanJet 2200C */ // { USB_DEVICE(0x03f0, 0x0701) }, /* ScanJet 5300C - NOT SUPPORTED - use hpusbscsi driver */ { USB_DEVICE(0x03f0, 0x0705) }, /* ScanJet 4400C */ // { USB_DEVICE(0x03f0, 0x0801) }, /* ScanJet 7400C - NOT SUPPORTED - use hpusbscsi driver */ { USB_DEVICE(0x03f0, 0x0901) }, /* ScanJet 2300C */ { USB_DEVICE(0x03F0, 0x1005) }, /* ScanJet 5400C */ { USB_DEVICE(0x03F0, 0x1105) }, /* ScanJet 5470C */ { USB_DEVICE(0x03f0, 0x1305) }, /* Scanjet 4570c */ { USB_DEVICE(0x03f0, 0x2005) }, /* ScanJet 3570c */ { USB_DEVICE(0x03f0, 0x2205) }, /* ScanJet 3500c */ /* iVina */ { USB_DEVICE(0x0638, 0x0268) }, /* 1200U */ /* Lexmark */ { USB_DEVICE(0x043d, 0x002d) }, /* X70/X73 */ { USB_DEVICE(0x043d, 0x003d) }, /* X83 */ /* LG Electronics */ { USB_DEVICE(0x0461, 0x0364) }, /* Scanworks 600U (repackaged Primax?) */ /* Medion */ { USB_DEVICE(0x0461, 0x0377) }, /* MD 5345 - repackaged Primax? */ /* Memorex */ { USB_DEVICE(0x0461, 0x0346) }, /* 6136u - repackaged Primax ? */ /* Microtek */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -