Commit | Line | Data |
---|---|---|
15637ed4 RG |
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 | * | |
01e1b05c RG |
33 | * from: @(#)vsio.h 7.4 (Berkeley) 5/9/91 |
34 | * $Id$ | |
15637ed4 RG |
35 | */ |
36 | ||
37 | /**************************************************************************** | |
38 | * * | |
39 | * Copyright (c) 1983, 1984 by * | |
40 | * DIGITAL EQUIPMENT CORPORATION, Maynard, Massachusetts. * | |
41 | * All rights reserved. * | |
42 | * * | |
43 | * This software is furnished on an as-is basis and may be used and copied * | |
44 | * only with inclusion of the above copyright notice. This software or any * | |
45 | * other copies thereof may be provided or otherwise made available to * | |
46 | * others only for non-commercial purposes. No title to or ownership of * | |
47 | * the software is hereby transferred. * | |
48 | * * | |
49 | * The information in this software is subject to change without notice * | |
50 | * and should not be construed as a commitment by DIGITAL EQUIPMENT * | |
51 | * CORPORATION. * | |
52 | * * | |
53 | * DIGITAL assumes no responsibility for the use or reliability of its * | |
54 | * software on equipment which is not supplied by DIGITAL. * | |
55 | * * | |
56 | * * | |
57 | ****************************************************************************/ | |
58 | /* | |
59 | * vsio.h - VS100 I/O command definitions | |
60 | * | |
61 | * Author: Christopher A. Kent | |
62 | * Digital Equipment Corporation | |
63 | * Western Research Lab | |
64 | * Date: Tue Jun 21 1983 | |
65 | */ | |
66 | ||
67 | /* | |
68 | * Possible ioctl calls | |
69 | */ | |
70 | ||
71 | #define VSIOINIT _IO('V', 0) /* init the device */ | |
72 | #define VSIOSTART _IOW('V', 1, int) /* start microcode */ | |
73 | #define VSIOABORT _IO('V', 2) /* abort a command chain */ | |
74 | #define VSIOPWRUP _IO('V', 3) /* power-up reset */ | |
75 | #define VSIOGETVER _IOR('V', 4, int) /* get rom version */ | |
76 | #define VSIOSYNC _IO('V', 6) /* synch with device */ | |
77 | #define VSIOBBACTL _IOW('V', 8, int) /* control the BBA */ | |
78 | #define VSIOFIBCTL _IOW('V', 9, int) /* lamp on/off */ | |
79 | #define VSIOFIBRETRY _IOW('V',10, int) /* fiber retries */ | |
80 | #define VSIOGETSTATS _IOR('V',11, vsStats) /* get statistics */ | |
81 | #define VSIOGETIOA _IOR('V',13, vsIoAddrAddr)/* get ioreg address */ | |
82 | #define VSIOUSERWAIT _IO('V', 15) /* wait for user I/O completion */ | |
83 | #define VSIOWAITGO _IOW('V', 16, caddr_t) /* wait then go */ | |
84 | ||
85 | ||
86 | #define VSIO_OFF 0 /* option off */ | |
87 | #define VSIO_ON 1 /* option on */ | |
88 | ||
89 | #define VS_FIB_FINITE 1 /* finite retries */ | |
90 | #define VS_FIB_INFINITE 2 /* infinite retries */ | |
91 | ||
92 | /* | |
93 | * Event queue entries | |
94 | */ | |
95 | ||
96 | typedef struct _vs_event{ | |
97 | u_short vse_x; /* x position */ | |
98 | u_short vse_y; /* y position */ | |
99 | u_short vse_time; /* 10 millisecond units (button only) */ | |
100 | char vse_type; /* button or motion? */ | |
101 | u_char vse_key; /* the key (button only) */ | |
102 | char vse_direction; /* which direction (button only) */ | |
103 | char vse_device; /* which device (button only) */ | |
104 | }vsEvent; | |
105 | ||
106 | #define VSE_BUTTON 0 /* button moved */ | |
107 | #define VSE_MMOTION 1 /* mouse moved */ | |
108 | #define VSE_TMOTION 2 /* tablet moved */ | |
109 | ||
110 | #define VSE_KBTUP 0 /* up */ | |
111 | #define VSE_KBTDOWN 1 /* down */ | |
112 | ||
113 | #define VSE_MOUSE 1 /* mouse */ | |
114 | #define VSE_DKB 2 /* main keyboard */ | |
115 | #define VSE_TABLET 3 /* graphics tablet */ | |
116 | #define VSE_AUX 4 /* auxiliary */ | |
117 | #define VSE_CONSOLE 5 /* console */ | |
118 | ||
119 | typedef struct _vsStats{ | |
120 | int errors; /* count errors */ | |
121 | int unsolIntr; /* count unsolicited interrupts */ | |
122 | int overruns; /* event queue overruns */ | |
123 | int flashes; /* flashes on fiber link */ | |
124 | int ignites; /* times turned on */ | |
125 | int douses; /* times turned off */ | |
126 | int linkErrors; /* link errors */ | |
127 | }vsStats; | |
128 | ||
129 | typedef struct _vs_cursor{ | |
130 | short x; | |
131 | short y; | |
132 | }vsCursor; | |
133 | ||
134 | typedef struct _vs_box { | |
135 | short bottom; | |
136 | short right; | |
137 | short left; | |
138 | short top; | |
139 | }vsBox; | |
140 | ||
141 | typedef struct _vsIoAddr { | |
142 | short *ioreg; | |
143 | short status; | |
144 | caddr_t obuff; | |
145 | int obufflen; | |
146 | int reloc; | |
147 | vsEvent *ibuff; | |
148 | int iqsize; /* may assume power of 2 */ | |
149 | int ihead; /* atomic write */ | |
150 | int itail; /* atomic read */ | |
151 | vsCursor mouse; /* atomic read/write */ | |
152 | vsBox mbox; /* atomic read/write */ | |
153 | } vsIoAddr; | |
154 | typedef vsIoAddr *vsIoAddrAddr; |