summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbriggs <briggs@cvs.openbsd.org>1996-02-20 04:57:41 +0000
committerbriggs <briggs@cvs.openbsd.org>1996-02-20 04:57:41 +0000
commita6c4827de9c4a421327861a2ae0a0165ae6457cc (patch)
treefb01a831353bc9ba5f4c6b25d0774f0176e666cf
parent6c7622bbeca2fa3132aa4ec46fc4717ad78f0662 (diff)
Bring in from NetBSD.
-rw-r--r--sys/sys/cpu.h60
-rw-r--r--sys/sys/dkio.h62
-rw-r--r--sys/sys/scanio.h130
3 files changed, 252 insertions, 0 deletions
diff --git a/sys/sys/cpu.h b/sys/sys/cpu.h
new file mode 100644
index 00000000000..cdd8dcc371e
--- /dev/null
+++ b/sys/sys/cpu.h
@@ -0,0 +1,60 @@
+/* $NetBSD: cpu.h,v 1.4 1996/02/16 17:25:46 gwr Exp $ */
+
+/*
+ * Copyright (c) 1996 Christos Zoulas. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by Christos Zoulas.
+ * 4. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifdef _KERNEL
+struct proc;
+struct vnode;
+struct code;
+struct ucred;
+struct core;
+struct buf;
+struct disklabel;
+struct device;
+struct disk;
+__BEGIN_DECLS
+
+void consinit __P((void));
+void boot __P((int));
+void pagemove __P((caddr_t, caddr_t, size_t));
+/* delay() is declared in <machine/param.h> */
+int bounds_check_with_label __P((struct buf *, struct disklabel *, int));
+int dk_establish __P((struct disk *, struct device *));
+
+
+void cpu_exit __P((struct proc *));
+void cpu_startup __P((void));
+void cpu_initclocks __P((void));
+void cpu_switch __P((struct proc *));
+int cpu_coredump __P((struct proc *, struct vnode *, struct ucred *,
+ struct core *));
+__END_DECLS
+
+#endif /* _KERNEL */
diff --git a/sys/sys/dkio.h b/sys/sys/dkio.h
new file mode 100644
index 00000000000..c223775ef17
--- /dev/null
+++ b/sys/sys/dkio.h
@@ -0,0 +1,62 @@
+/* $NetBSD: dkio.h,v 1.1 1996/01/30 18:21:48 thorpej Exp $ */
+
+/*
+ * Copyright (c) 1987, 1988, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _SYS_DKIO_H_
+#define _SYS_DKIO_H_
+
+#include <sys/ioccom.h>
+
+/*
+ * Disk-specific ioctls.
+ */
+ /* get and set disklabel; DIOCGPART used internally */
+#define DIOCGDINFO _IOR('d', 101, struct disklabel)/* get */
+#define DIOCSDINFO _IOW('d', 102, struct disklabel)/* set */
+#define DIOCWDINFO _IOW('d', 103, struct disklabel)/* set, update disk */
+#define DIOCGPART _IOW('d', 104, struct partinfo) /* get partition */
+
+/* do format operation, read or write */
+#define DIOCRFORMAT _IOWR('d', 105, struct format_op)
+#define DIOCWFORMAT _IOWR('d', 106, struct format_op)
+
+#define DIOCSSTEP _IOW('d', 107, int) /* set step rate */
+#define DIOCSRETRIES _IOW('d', 108, int) /* set # of retries */
+#define DIOCWLABEL _IOW('d', 109, int) /* write en/disable label */
+
+#define DIOCSBAD _IOW('d', 110, struct dkbad) /* set kernel dkbad */
+#define DIOCEJECT _IO('d', 112) /* eject removable disk */
+#define DIOCLOCK _IOW('d', 113, int) /* lock/unlock pack */
+
+#endif /* _SYS_DKIO_H_ */
diff --git a/sys/sys/scanio.h b/sys/sys/scanio.h
new file mode 100644
index 00000000000..2d08f6f88e6
--- /dev/null
+++ b/sys/sys/scanio.h
@@ -0,0 +1,130 @@
+/* $NetBSD: scanio.h,v 1.1 1996/02/18 20:33:18 mycroft Exp $ */
+
+/*
+ * Copyright (c) 1995 Kenneth Stailey. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by Kenneth Stailey.
+ * 4. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * Definitions for PINT scanner drivers
+ */
+
+#ifndef _SYS_SCANIO_H
+#define _SYS_SCANIO_H
+
+/*
+ * XXX scancap make this sort of obsolete:
+ *
+ * Some comments about the values in the scan_io struct:
+ *
+ * All user-changeable values have minimum and maximum values for
+ * specific scanner types and are rejected by the special drivers if
+ * they are not in range. For values in the range, the driver selects
+ * the next physically possible setting for the particular scanner.
+ * So it is good practice to issue a SCIOCGET after a SCIOCSET to see
+ * what the driver has chosen.
+ *
+ * Brightness and contrast default to 100 (%) but scanners may support
+ * higher and/or lower values, though the maximum value is 255.
+ * velocity is the scan speed and defaults to 100 (%), only slower
+ * values may be possible.
+ */
+
+struct scan_io {
+ u_long scan_width; /* width in 1/1200ths of an inch */
+ u_long scan_height; /* height in 1/1200ths of an inch */
+#ifdef SCAN_BC
+# define scan_window_width scan_width
+# define scan_window_length scan_height
+#endif
+ u_short scan_x_resolution; /* horizontal resolution in dots-per-inch */
+ u_short scan_y_resolution; /* vertical resolution in dots-per-inch */
+ u_long scan_x_origin; /* horizontal coordinate of upper left corner */
+ u_long scan_y_origin; /* vertical coordinate of upper left corner */
+ u_char scan_image_mode; /* type of image data sent by scanner */
+ u_char scan_brightness; /* brightness control for those to can do it */
+ u_char scan_contrast; /* contrast control for those to can do it */
+ u_char scan_quality; /* speed of scan for instance */
+#ifdef SCAN_BC
+# define scan_velocity scan_quality
+#endif
+ u_long scan_window_size; /* size of window in bytes (ro) */
+ u_long scan_lines; /* number of pixels per column (ro) */
+ u_long scan_pixels_per_line; /* number of pixels per line (ro) */
+ u_short scan_bits_per_pixel; /* number of bits per pixel (ro) */
+ u_char scan_scanner_type; /* type of scanner (ro) */
+};
+
+/*
+ * defines for different commands
+ */
+
+#define SCIOCGET _IOR('S', 1, struct scan_io) /* retrieve parameters */
+#define SCIOCSET _IOW('S', 2, struct scan_io) /* set parameters */
+#define SCIOCRESTART _IO('S', 3) /* restart scan */
+#define SCIOC_USE_ADF _IO('S', 4) /* use ADF as paper source for next scan */
+ /* even after close() */
+#ifdef SCAN_BC
+# define SCAN_GET SCIOCGET
+# define SCAN_SET SCIOCSET
+# define SCAN_REWIND SCIOCRESTART
+# define SCAN_USE_ADF SCIOC_USE_ADF
+#endif
+
+/*
+ * defines for scan_image_mode field
+ */
+
+#define SIM_BINARY_MONOCHROME 0
+#define SIM_DITHERED_MONOCHROME 1
+#define SIM_GRAYSCALE 2
+#define SIM_COLOR 5
+#define SIM_RED 103
+#define SIM_GREEN 104
+#define SIM_BLUE 105
+
+/*
+ * defines for different types of scanners & product names as comments
+ */
+
+#define RICOH_IS410 1 /* Ricoh IS-410 */
+#define FUJITSU_M3096G 2 /* Fujitsu M3096G */
+#ifdef SCAN_BC
+# define FUJITSU 2 /* Fujitsu M3096G (deprecated) */
+#endif
+#define HP_SCANJET_IIC 3 /* HP ScanJet IIc */
+#define RICOH_FS1 4 /* Ricoh FS1 */
+#define SHARP_JX600 5 /* Sharp JX600 */
+#define RICOH_IS50 6 /* Ricoh IS-50 */
+#define IBM_2456 7 /* IBM 2456 */
+#define UMAX_UC630 8 /* UMAX UC630 */
+#define UMAX_UG630 9 /* UMAX UG630 */
+#define MUSTEK_06000CX 10 /* Mustek MFS06000CX */
+#define MUSTEK_12000CX 11 /* Mustek MFS12000CX */
+#define EPSON_ES300C 12 /* epson es300c */
+
+#endif /* _SYS_SCANIO_H */