1 .\" asc(4) - manual page for the scanner device driver `asc'
4 .\" Copyright (c) 1995 Gunther Schadow, Luigi Rizzo. All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
14 .\" 3. All advertising materials mentioning features or use of this software
15 .\" must display the following acknowledgements:
16 .\" This product includes software developed by Gunther Schadow.
17 .\" This product includes software developed by Luigi Rizzo.
18 .\" 4. The name of the author may not be used to endorse or promote products
19 .\" derived from this software without specific prior written permission.
21 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 .\" $FreeBSD: src/share/man/man4/man4.i386/asc.4,v 1.14.2.2 2001/08/17 13:08:45 ru Exp $
38 .Nd device driver for a GI1904-based hand scanner
40 .Cd "device asc0 at isa? port IO_ASC1 drq 3 irq 10"
44 character device driver currently handles the
46 hand scanner (e.g. Trust Amiscan Grey).
47 It uses DMA and interrupts.
48 Up to 50 lines of scanned input data are buffered in the driver.
50 The device can operate at four different resolutions: 100, 200, 300
51 and 400 dots per inch.
52 It produces a simple bitmap with the most
53 significant bit at the left side. The driver can optionally output
54 the simple portable bitmap file format
56 thus the scans can easily processed by most graphics packages.
58 The width of the output bitmap is fixed as given by the
59 resolution value. However, the height of the bitmap must be
62 mode, since the driver must know at what time the
63 `end-of-file' shall be reached. The default is to produce a
64 square image; i.e., height equals width.
65 With this feature one is able to
66 directly copy the scanner output into a
70 One can obtain a similar effect by using
77 commands applicable to
82 provides user-level access to these commands.
83 .Bl -tag -width "ASC_GHEIGHT"
86 Get current resolution in dots per inch (dpi).
89 Get current width of the bitmap in pixels.
92 Set the height of the bitmap in
94 mode. This is actually
95 a limit on the amount of lines scannable after the first read
96 operation. When the limit is reached, read will return 0. However, the
97 device is turned off only when the last open file descriptor is closed.
100 Get the current height of the bitmap.
103 Set the length of the buffer used internally to do the DMA transfer.
104 The buffer length is supplied in lines of the bitmap.
106 size limit is (currently) 0x3000 bytes, the maximum number of lines
107 allowed will vary with the width of each line. An
109 error is returned if the requested length would exceed this limit.
112 Get the current buffer length in lines.
115 Set the timeout for the completion of reading one buffer.
117 handy scanner is a human/computer interface timeout values are usually
118 higher than those of a flat scanner; the default is 15 seconds. After
119 timeout is reached the read operation will fail with
122 the timeout timer starts anew for each buffer to be read and thus
123 reducing it does not result in faster scans for longer images.
126 Get the current buffer timeout.
131 requests that modify a parameter except
133 do not have an effect on an ongoing scan process. The user must close
134 the device and open it again for the new selections to take effect.
135 Consequently, the selections are
137 reset when the device is opened or closed.
139 Similarly, requests that read a value do not report the value that is
140 used for the ongoing scan process. The values needed during the scan
141 process are saved when it starts and thus are not accessed by
147 value does, however, have an immediate effect on the ongoing scan.
148 Thus the timeout can, for example, be set to a large value until the
149 user starts scanning, and then set to a small value to react
150 (nearly) immediately when the user stops.
154 versus raw mode selection is done by the
157 requests. In raw mode, the selected
158 height of the bitmap will have no effect.
160 .Bl -tag -width /dev/asc0pd -compact
162 device node for raw output
164 device node for raw output, emitting debug messages if the
166 option was given in the kernel configuration file
168 device node for output in
183 Ioctl support is not working yet.
187 driver was written by
192 driver first appeared in