📄 scanner.h
字号:
{ USB_DEVICE(0x05da, 0x30ce) }, /* ScanMaker 3800 */ { USB_DEVICE(0x05da, 0x30cf) }, /* ScanMaker 4800 */ /* The following SCSI-over-USB Microtek devices are supported by the microtek driver: Enable SCSI and USB Microtek in kernel config */ // { USB_DEVICE(0x05da, 0x0099) }, /* ScanMaker X6 - X6U */ // { USB_DEVICE(0x05da, 0x0094) }, /* Phantom 336CX - C3 */ // { USB_DEVICE(0x05da, 0x00a0) }, /* Phantom 336CX - C3 #2 */ // { USB_DEVICE(0x05da, 0x009a) }, /* Phantom C6 */ // { USB_DEVICE(0x05da, 0x00a3) }, /* ScanMaker V6USL */ // { USB_DEVICE(0x05da, 0x80a3) }, /* ScanMaker V6USL #2 */ // { USB_DEVICE(0x05da, 0x80ac) }, /* ScanMaker V6UL - SpicyU */ /* Minolta */ { USB_DEVICE(0x0686, 0x400d) }, /* Scan Dual III */ /* The following SCSI-over-USB Minolta devices are supported by the hpusbscsi driver: Enable SCSI and USB hpusbscsi in kernel config */ // { USB_DEVICE(0x0638, 0x026a) }, /* Minolta Dimage Scan Dual II */ // { USB_DEVICE(0x0686, 0x4004) }, /* Scan Elite II (need interrupt ep) */ /* Mustek */ { USB_DEVICE(0x0400, 0x1000) }, /* BearPaw 1200 (National Semiconductor LM9831) */ { USB_DEVICE(0x0400, 0x1001) }, /* BearPaw 2400 (National Semiconductor LM9832) */ { USB_DEVICE(0x055f, 0x0001) }, /* ScanExpress 1200 CU */ { USB_DEVICE(0x055f, 0x0002) }, /* ScanExpress 600 CU */ { USB_DEVICE(0x055f, 0x0003) }, /* ScanExpress 1200 USB */ { USB_DEVICE(0x055f, 0x0006) }, /* ScanExpress 1200 UB */ { USB_DEVICE(0x055f, 0x0007) }, /* ScanExpress 1200 USB Plus */ { USB_DEVICE(0x055f, 0x0008) }, /* ScanExpress 1200 CU Plus */ { USB_DEVICE(0x055f, 0x0010) }, /* BearPaw 1200F */ { USB_DEVICE(0x055f, 0x0210) }, /* ScanExpress A3 USB */ { USB_DEVICE(0x055f, 0x0218) }, /* BearPaw 2400 TA */ { USB_DEVICE(0x055f, 0x0219) }, /* BearPaw 2400 TA Plus */ { USB_DEVICE(0x055f, 0x021c) }, /* BearPaw 1200 CU Plus */ { USB_DEVICE(0x055f, 0x021d) }, /* Bearpaw 2400 CU Plus */ { USB_DEVICE(0x055f, 0x021e) }, /* BearPaw 1200 TA/CS */ { USB_DEVICE(0x055f, 0x0400) }, /* BearPaw 2400 TA PRO */ { USB_DEVICE(0x055f, 0x0873) }, /* ScanExpress 600 USB */ { USB_DEVICE(0x055f, 0x1000) }, /* BearPaw 4800 TA PRO */ // { USB_DEVICE(0x05d8, 0x4002) }, /* BearPaw 1200 CU and ScanExpress 1200 UB Plus (see Artec) */ /* Nikon */ { USB_DEVICE(0x04b0, 0x4000) }, /* Coolscan LS 40 ED */ /* Plustek */ { USB_DEVICE(0x07b3, 0x0005) }, /* Unknown */ { USB_DEVICE(0x07b3, 0x0007) }, /* Unknown */ { USB_DEVICE(0x07b3, 0x000F) }, /* Unknown */ { USB_DEVICE(0x07b3, 0x0010) }, /* OpticPro U12 */ { USB_DEVICE(0x07b3, 0x0011) }, /* OpticPro U24 */ { USB_DEVICE(0x07b3, 0x0012) }, /* Unknown */ { USB_DEVICE(0x07b3, 0x0013) }, /* Unknown */ { USB_DEVICE(0x07b3, 0x0014) }, /* Unknown */ { USB_DEVICE(0x07b3, 0x0015) }, /* OpticPro U24 */ { USB_DEVICE(0x07b3, 0x0016) }, /* Unknown */ { USB_DEVICE(0x07b3, 0x0017) }, /* OpticPro UT12/UT16/UT24 */ { USB_DEVICE(0x07b3, 0x0400) }, /* OpticPro 1248U */ { USB_DEVICE(0x07b3, 0x0401) }, /* OpticPro 1248U (another one) */ /* Primax/Colorado */ { USB_DEVICE(0x0461, 0x0300) }, /* G2-300 #1 */ { USB_DEVICE(0x0461, 0x0301) }, /* G2E-300 #1 */ { USB_DEVICE(0x0461, 0x0302) }, /* G2-300 #2 */ { USB_DEVICE(0x0461, 0x0303) }, /* G2E-300 #2 */ { USB_DEVICE(0x0461, 0x0340) }, /* Colorado USB 9600 */ { USB_DEVICE(0x0461, 0x0341) }, /* Colorado 600u */ { USB_DEVICE(0x0461, 0x0347) }, /* Primascan Colorado 2600u */ { USB_DEVICE(0x0461, 0x0360) }, /* Colorado USB 19200 */ { USB_DEVICE(0x0461, 0x0361) }, /* Colorado 1200u */ { USB_DEVICE(0x0461, 0x0380) }, /* G2-600 #1 */ { USB_DEVICE(0x0461, 0x0381) }, /* ReadyScan 636i */ { USB_DEVICE(0x0461, 0x0382) }, /* G2-600 #2 */ { USB_DEVICE(0x0461, 0x0383) }, /* G2E-600 */ /* Prolink */ { USB_DEVICE(0x06dc, 0x0014) }, /* Winscan Pro 2448U */ /* Relisis */ // { USB_DEVICE(0x0475, 0x0103) }, /* Episode - undetected endpoint */ /* Seiko/Epson Corp. */ { USB_DEVICE(0x04b8, 0x0101) }, /* Perfection 636U and 636Photo */ { USB_DEVICE(0x04b8, 0x0102) }, /* GT-2200 */ { USB_DEVICE(0x04b8, 0x0103) }, /* Perfection 610 */ { USB_DEVICE(0x04b8, 0x0104) }, /* Perfection 1200U and 1200Photo*/ { USB_DEVICE(0x04b8, 0x0105) }, /* StylusScan 2000 */ { USB_DEVICE(0x04b8, 0x0106) }, /* Stylus Scan 2500 */ { USB_DEVICE(0x04b8, 0x0107) }, /* Expression 1600 */ { USB_DEVICE(0x04b8, 0x0109) }, /* Expression 1640XL */ { USB_DEVICE(0x04b8, 0x010a) }, /* Perfection 1640SU and 1640SU Photo */ { USB_DEVICE(0x04b8, 0x010b) }, /* Perfection 1240U */ { USB_DEVICE(0x04b8, 0x010c) }, /* Perfection 640U */ { USB_DEVICE(0x04b8, 0x010e) }, /* Expression 1680 */ { USB_DEVICE(0x04b8, 0x010f) }, /* Perfection 1250U */ { USB_DEVICE(0x04b8, 0x0110) }, /* Perfection 1650 */ { USB_DEVICE(0x04b8, 0x0112) }, /* Perfection 2450 - GT-9700 for the Japanese mkt */ { USB_DEVICE(0x04b8, 0x0114) }, /* Perfection 660 */ { USB_DEVICE(0x04b8, 0x011b) }, /* Perfection 2400 Photo */ { USB_DEVICE(0x04b8, 0x011c) }, /* Perfection 3200 */ { USB_DEVICE(0x04b8, 0x011d) }, /* Perfection 1260 */ { USB_DEVICE(0x04b8, 0x011e) }, /* Perfection 1660 Photo */ { USB_DEVICE(0x04b8, 0x0801) }, /* Stylus CX5200 */ { USB_DEVICE(0x04b8, 0x0802) }, /* Stylus CX3200 */ /* SYSCAN */ { USB_DEVICE(0x0a82, 0x4600) }, /* TravelScan 460/464 */ /* Trust */ { USB_DEVICE(0x05cb, 0x1483) }, /* CombiScan 19200 */ { USB_DEVICE(0x05d8, 0x4006) }, /* Easy Webscan 19200 (repackaged Artec?) */ /* Umax */ { USB_DEVICE(0x05d8, 0x4009) }, /* Astraslim (actually Artec?) */ { USB_DEVICE(0x1606, 0x0010) }, /* Astra 1220U */ { USB_DEVICE(0x1606, 0x0030) }, /* Astra 2000U */ { USB_DEVICE(0x1606, 0x0060) }, /* Astra 3400U/3450U */ { USB_DEVICE(0x1606, 0x0130) }, /* Astra 2100U */ { USB_DEVICE(0x1606, 0x0160) }, /* Astra 5400U */ { USB_DEVICE(0x1606, 0x0230) }, /* Astra 2200U */ /* Visioneer */ { USB_DEVICE(0x04a7, 0x0211) }, /* OneTouch 7600 USB */ { USB_DEVICE(0x04a7, 0x0221) }, /* OneTouch 5300 USB */ { USB_DEVICE(0x04a7, 0x0231) }, /* 6100 USB */ { USB_DEVICE(0x04a7, 0x0311) }, /* 6200 EPP/USB */ { USB_DEVICE(0x04a7, 0x0321) }, /* OneTouch 8100 EPP/USB */ { USB_DEVICE(0x04a7, 0x0331) }, /* OneTouch 8600 EPP/USB */ { USB_DEVICE(0x0461, 0x0345) }, /* 6200 (actually Primax?) */ { USB_DEVICE(0x0461, 0x0371) }, /* Onetouch 8920 USB (actually Primax?) */ { } /* Terminating entry */};MODULE_DEVICE_TABLE (usb, scanner_device_ids);#define IS_EP_BULK(ep) ((ep).bmAttributes == USB_ENDPOINT_XFER_BULK ? 1 : 0)#define IS_EP_BULK_IN(ep) (IS_EP_BULK(ep) && ((ep).bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN)#define IS_EP_BULK_OUT(ep) (IS_EP_BULK(ep) && ((ep).bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_OUT)#define IS_EP_INTR(ep) ((ep).bmAttributes == USB_ENDPOINT_XFER_INT ? 1 : 0)#define USB_SCN_MINOR(X) MINOR((X)->i_rdev) - SCN_BASE_MNR#ifdef DEBUG#define SCN_DEBUG(X) X#else#define SCN_DEBUG(X)#endif#define IBUF_SIZE 32768#define OBUF_SIZE 4096/* read_scanner timeouts -- RD_NAK_TIMEOUT * RD_EXPIRE = Number of seconds */#define RD_NAK_TIMEOUT (10*HZ) /* Default number of X seconds to wait */#define RD_EXPIRE 12 /* Number of attempts to wait X seconds *//* USB bInterfaceClass used by Hewlett-Packard ScanJet 3300c and Genius HR6 USB - Vivid III */#define SCN_CLASS_SCANJET 16#define SCN_MAX_MNR 16 /* We're allocated 16 minors */#define SCN_BASE_MNR 48 /* USB Scanners start at minor 48 */static DECLARE_MUTEX (scn_mutex); /* Initializes to unlocked */struct scn_usb_data { struct usb_device *scn_dev; devfs_handle_t devfs; /* devfs device */ struct urb scn_irq; unsigned int ifnum; /* Interface number of the USB device */ kdev_t scn_minor; /* Scanner minor - used in disconnect() */ unsigned char button; /* Front panel buffer */ char isopen; /* Not zero if the device is open */ char present; /* Not zero if device is present */ char *obuf, *ibuf; /* transfer buffers */ char bulk_in_ep, bulk_out_ep, intr_ep; /* Endpoint assignments */ wait_queue_head_t rd_wait_q; /* read timeouts */ struct semaphore sem; /* lock to prevent concurrent reads or writes */ unsigned int rd_nak_timeout; /* Seconds to wait before read() timeout. */};extern devfs_handle_t usb_devfs_handle;static struct scn_usb_data *p_scn_table[SCN_MAX_MNR] = { NULL, /* ... */};static struct usb_driver scanner_driver;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -