BSD 4_3_Net_2 release
[unix-history] / usr / src / sys / vax / if / if_dpreg.h
CommitLineData
347a05ff
KS
1/*
2 * Copyright (c) 1982, 1986, 1988 Regents of the University of California.
3 * All rights reserved.
4 *
af359dea
C
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.
347a05ff 20 *
af359dea
C
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 * @(#)if_dpreg.h 7.2 (Berkeley) 8/30/90
347a05ff
KS
34 */
35
36/*
37 * DPV-11 Registers and bits.
38 */
39struct dpdevice {
40 short dprcsr; /* Receive Control and Status Register */
41 union {
42 short u_rdsr; /* Receive Data and Status Reg, rd only */
43 short u_sar; /* Parameter Control Sync/Address Reg, wr only*/
44 } dpun;
45 short dpclr; /* Parameter Control/Character Length Reg */
46 short dptdsr; /* Transmit Data and Status Register */
47};
48
4c60338c 49#define dprdsr dpun.u_rdsr
347a05ff
KS
50#define dpsar dpun.u_sar
51
52
53/* bits in dprcsr */
54#define DP_RL 0x0001 /* Remote Loopback Mode */
55#define DP_DTR 0x0002 /* Data Terminal Ready (modem) */
56#define DP_RTS 0x0004 /* Request to Send (modem) */
57#define DP_LL 0x0008 /* Local Loopback */
58#define DP_RE 0x0010 /* Enable Receiver */
59#define DP_MIE 0x0020 /* Modem (Change) Interrupt Enable */
60#define DP_RIE 0x0040 /* Receiver Interrupt Enable */
61#define DP_RDR 0x0080 /* Receiver Data Ready */
62#define DP_SFD 0x0100 /* Sync or Flag Detected */
63#define DP_DSR 0x0200 /* Data Set Ready (modem) */
64#define DP_RSR 0x0400 /* Receiver Status Ready (attention) */
65#define DP_RA 0x0800 /* Receiver Active (receiving data) */
66#define DP_RR 0x1000 /* Receiver Ready (modem) */
67#define DP_CTS 0x2000 /* Clear to Send (modem) */
68#define DP_IC 0x4000 /* Incoming Call */
69#define DP_MSC 0x8000 /* Modem Status Change (CTS, RR, IC, DM) */
70
71/* flags for modem-control */
72#define DP_ON DP_DTR
73#define DP_OFF 0
74
75/* bits in dprdsr */
76#define DP_RBUF 0x00ff /* Received Data */
77#define DP_RSM 0x0100 /* Receiver Start of Message */
78#define DP_REM 0x0200 /* Receiver End of Message */
79#define DP_RGA 0x0400 /* Receiver Go-Ahead or Abort */
80#define DP_ROVR 0x0800 /* Receiver Receiver Over-Run */
81#define DP_RABC 0x7000 /* Reciever Assembled Bit Count */
82#define DP_REC 0x8000 /* Reciever Error Check */
83
84/* bits in dpsar */
85#define DP_SYNC 0x00ff /* Sync Char or Station Address */
86#define DP_EM 0x0700 /* Error Detection Mode */
87#define DP_IDLE 0x0800 /* Idle Mode Select */
88#define DP_SAM 0x1000 /* Secondary Address Mode */
89#define DP_SSLM 0x2000 /* Strip Synch/Loop Mode */
90#define DP_CHRM 0x4000 /* Character/Bit Mode */
91#define DP_APA 0x8000 /* Recognize All Parties Addressed */
92
93/* bits in dpclr */
94#define DP_CLR 0x0001 /* Reset DP */
95#define DP_XA 0x0002 /* Transmiter Active (transmitting data) */
96#define DP_XBE 0x0004 /* Transmit Buffer Available */
97#define DP_ILB 0x0008 /* Internal Loopback (Maintenance Mode) */
98#define DP_XE 0x0010 /* Transmit Enable */
99#define DP_SQTM 0x0020 /* Signal Quality/Test Mode */
100#define DP_XIE 0x0040 /* Transmit Interrupt Enable */
101#define DP_MBZ1 0x0080 /* Reserved (must be zero) */
102#define DP_RCL 0x0700 /* Receive Character Length */
103#define DP_RL8 0x0000 /* RCL = 8 bits */
104#define DP_RL7 0x0700 /* RCL = 7 bits */
105#define DP_RL6 0x0600 /* RCL = 6 bits */
106#define DP_ECF 0x0800 /* Extended Control Field Option */
107#define DP_EAF 0x1000 /* Extended Address Field Option */
108#define DP_XCL 0xE000 /* Transmit Character Length */
109#define DP_XL8 0x0000 /* XCL = 8 bits */
110#define DP_XL7 0xE000 /* XCL = 7 bits */
111#define DP_XL6 0xC000 /* XCL = 6 bits */
112
113
114/* bits in dptdsr */
115#define DP_XBUF 0x00FF /* data to be transmitted */
116#define DP_XSM 0x0100 /* Transmit Start of Message */
117#define DP_XEM 0x0200 /* Transmit End of Message */
118#define DP_XABO 0x0400 /* Tranmsit Abort */
119#define DP_XGA 0x0800 /* Tranmsit Go - Ahead */
120#define DP_MBZ2 0x7000 /* Reserved (must be zero) */
121#define DP_XERR 0x8000 /* Data Late -- XBUF not serviced in time */
122
123#define DP_MTU 2048 /* Very Big X.25 data, normally 128 */