|
|
1.1 root 1: /*-
2: * Copyright (c) 1987 The Regents of the University of California.
3: * All rights reserved.
4: *
5: * Redistribution and use in source and binary forms, with or without
6: * modification, are permitted provided that the following conditions
7: * are met:
8: * 1. Redistributions of source code must retain the above copyright
9: * notice, this list of conditions and the following disclaimer.
10: * 2. Redistributions in binary form must reproduce the above copyright
11: * notice, this list of conditions and the following disclaimer in the
12: * documentation and/or other materials provided with the distribution.
13: * 3. All advertising materials mentioning features or use of this software
14: * must display the following acknowledgement:
15: * This product includes software developed by the University of
16: * California, Berkeley and its contributors.
17: * 4. Neither the name of the University nor the names of its contributors
18: * may be used to endorse or promote products derived from this software
19: * without specific prior written permission.
20: *
21: * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22: * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24: * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25: * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26: * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27: * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28: * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29: * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30: * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31: * SUCH DAMAGE.
32: *
33: * @(#)vsio.h 7.4 (Berkeley) 5/9/91
34: */
35:
36: /****************************************************************************
37: * *
38: * Copyright (c) 1983, 1984 by *
39: * DIGITAL EQUIPMENT CORPORATION, Maynard, Massachusetts. *
40: * All rights reserved. *
41: * *
42: * This software is furnished on an as-is basis and may be used and copied *
43: * only with inclusion of the above copyright notice. This software or any *
44: * other copies thereof may be provided or otherwise made available to *
45: * others only for non-commercial purposes. No title to or ownership of *
46: * the software is hereby transferred. *
47: * *
48: * The information in this software is subject to change without notice *
49: * and should not be construed as a commitment by DIGITAL EQUIPMENT *
50: * CORPORATION. *
51: * *
52: * DIGITAL assumes no responsibility for the use or reliability of its *
53: * software on equipment which is not supplied by DIGITAL. *
54: * *
55: * *
56: ****************************************************************************/
57: /*
58: * vsio.h - VS100 I/O command definitions
59: *
60: * Author: Christopher A. Kent
61: * Digital Equipment Corporation
62: * Western Research Lab
63: * Date: Tue Jun 21 1983
64: */
65:
66: /*
67: * Possible ioctl calls
68: */
69:
70: #define VSIOINIT _IO('V', 0) /* init the device */
71: #define VSIOSTART _IOW('V', 1, int) /* start microcode */
72: #define VSIOABORT _IO('V', 2) /* abort a command chain */
73: #define VSIOPWRUP _IO('V', 3) /* power-up reset */
74: #define VSIOGETVER _IOR('V', 4, int) /* get rom version */
75: #define VSIOSYNC _IO('V', 6) /* synch with device */
76: #define VSIOBBACTL _IOW('V', 8, int) /* control the BBA */
77: #define VSIOFIBCTL _IOW('V', 9, int) /* lamp on/off */
78: #define VSIOFIBRETRY _IOW('V',10, int) /* fiber retries */
79: #define VSIOGETSTATS _IOR('V',11, vsStats) /* get statistics */
80: #define VSIOGETIOA _IOR('V',13, vsIoAddrAddr)/* get ioreg address */
81: #define VSIOUSERWAIT _IO('V', 15) /* wait for user I/O completion */
82: #define VSIOWAITGO _IOW('V', 16, caddr_t) /* wait then go */
83:
84:
85: #define VSIO_OFF 0 /* option off */
86: #define VSIO_ON 1 /* option on */
87:
88: #define VS_FIB_FINITE 1 /* finite retries */
89: #define VS_FIB_INFINITE 2 /* infinite retries */
90:
91: /*
92: * Event queue entries
93: */
94:
95: typedef struct _vs_event{
96: u_short vse_x; /* x position */
97: u_short vse_y; /* y position */
98: u_short vse_time; /* 10 millisecond units (button only) */
99: char vse_type; /* button or motion? */
100: u_char vse_key; /* the key (button only) */
101: char vse_direction; /* which direction (button only) */
102: char vse_device; /* which device (button only) */
103: }vsEvent;
104:
105: #define VSE_BUTTON 0 /* button moved */
106: #define VSE_MMOTION 1 /* mouse moved */
107: #define VSE_TMOTION 2 /* tablet moved */
108:
109: #define VSE_KBTUP 0 /* up */
110: #define VSE_KBTDOWN 1 /* down */
111:
112: #define VSE_MOUSE 1 /* mouse */
113: #define VSE_DKB 2 /* main keyboard */
114: #define VSE_TABLET 3 /* graphics tablet */
115: #define VSE_AUX 4 /* auxiliary */
116: #define VSE_CONSOLE 5 /* console */
117:
118: typedef struct _vsStats{
119: int errors; /* count errors */
120: int unsolIntr; /* count unsolicited interrupts */
121: int overruns; /* event queue overruns */
122: int flashes; /* flashes on fiber link */
123: int ignites; /* times turned on */
124: int douses; /* times turned off */
125: int linkErrors; /* link errors */
126: }vsStats;
127:
128: typedef struct _vs_cursor{
129: short x;
130: short y;
131: }vsCursor;
132:
133: typedef struct _vs_box {
134: short bottom;
135: short right;
136: short left;
137: short top;
138: }vsBox;
139:
140: typedef struct _vsIoAddr {
141: short *ioreg;
142: short status;
143: caddr_t obuff;
144: int obufflen;
145: int reloc;
146: vsEvent *ibuff;
147: int iqsize; /* may assume power of 2 */
148: int ihead; /* atomic write */
149: int itail; /* atomic read */
150: vsCursor mouse; /* atomic read/write */
151: vsBox mbox; /* atomic read/write */
152: } vsIoAddr;
153: typedef vsIoAddr *vsIoAddrAddr;
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.