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 $
33 .\" $DragonFly: src/share/man/man4/man4.i386/asc.4,v 1.5 2008/01/26 15:14:41 swildner Exp $
39 .Nd device driver for a GI1904-based hand scanner
41 .Cd "device asc0 at isa? port IO_ASC1 drq 3 irq 10"
45 character device driver currently handles the
47 hand scanner (e.g. Trust Amiscan Grey).
48 It uses DMA and interrupts.
49 Up to 50 lines of scanned input data are buffered in the driver.
51 The device can operate at four different resolutions: 100, 200, 300
52 and 400 dots per inch.
53 It produces a simple bitmap with the most
54 significant bit at the left side. The driver can optionally output
55 the simple portable bitmap file format
57 thus the scans can easily processed by most graphics packages.
59 The width of the output bitmap is fixed as given by the
60 resolution value. However, the height of the bitmap must be
63 mode, since the driver must know at what time the
64 `end-of-file' shall be reached. The default is to produce a
65 square image; i.e., height equals width.
66 With this feature one is able to
67 directly copy the scanner output into a
71 One can obtain a similar effect by using
78 commands applicable to
83 provides user-level access to these commands.
84 .Bl -tag -width ".Dv ASC_GHEIGHT"
87 Get current resolution in dots per inch (dpi).
90 Get current width of the bitmap in pixels.
93 Set the height of the bitmap in
95 mode. This is actually
96 a limit on the amount of lines scannable after the first read
97 operation. When the limit is reached, read will return 0. However, the
98 device is turned off only when the last open file descriptor is closed.
101 Get the current height of the bitmap.
104 Set the length of the buffer used internally to do the DMA transfer.
105 The buffer length is supplied in lines of the bitmap.
107 size limit is (currently) 0x3000 bytes, the maximum number of lines
108 allowed will vary with the width of each line. An
110 error is returned if the requested length would exceed this limit.
113 Get the current buffer length in lines.
116 Set the timeout for the completion of reading one buffer.
118 handy scanner is a human/computer interface timeout values are usually
119 higher than those of a flat scanner; the default is 15 seconds. After
120 timeout is reached the read operation will fail with
123 the timeout timer starts anew for each buffer to be read and thus
124 reducing it does not result in faster scans for longer images.
127 Get the current buffer timeout.
132 requests that modify a parameter except
134 do not have an effect on an ongoing scan process. The user must close
135 the device and open it again for the new selections to take effect.
136 Consequently, the selections are
138 reset when the device is opened or closed.
140 Similarly, requests that read a value do not report the value that is
141 used for the ongoing scan process. The values needed during the scan
142 process are saved when it starts and thus are not accessed by
148 value does, however, have an immediate effect on the ongoing scan.
149 Thus the timeout can, for example, be set to a large value until the
150 user starts scanning, and then set to a small value to react
151 (nearly) immediately when the user stops.
155 versus raw mode selection is done by the
158 requests. In raw mode, the selected
159 height of the bitmap will have no effect.
161 .Bl -tag -width /dev/asc0pd -compact
163 device node for raw output
165 device node for raw output, emitting debug messages if the
167 option was given in the kernel configuration file
169 device node for output in
182 .Xr pbm 5 Pq Pa pkgsrc/graphics/netpbm
186 driver first appeared in
191 driver was written by
194 Ioctl support is not working yet.