dc7085.h Source File
Back to the index.
src
include
thirdparty
dc7085.h
Go to the documentation of this file.
1
/* gxemul: $Id: dc7085.h,v 1.3 2005-03-05 12:34:02 debug Exp $ */
2
/* $NetBSD: dc7085cons.h,v 1.6 2000/01/09 15:34:42 ad Exp $ */
3
4
/*
5
* Copyright (c) 1992, 1993
6
* The Regents of the University of California. All rights reserved.
7
*
8
* This code is derived from software contributed to Berkeley by
9
* Ralph Campbell and Rick Macklem.
10
*
11
* Redistribution and use in source and binary forms, with or without
12
* modification, are permitted provided that the following conditions
13
* are met:
14
* 1. Redistributions of source code must retain the above copyright
15
* notice, this list of conditions and the following disclaimer.
16
* 2. Redistributions in binary form must reproduce the above copyright
17
* notice, this list of conditions and the following disclaimer in the
18
* documentation and/or other materials provided with the distribution.
19
* 3. All advertising materials mentioning features or use of this software
20
* must display the following acknowledgement:
21
* This product includes software developed by the University of
22
* California, Berkeley and its contributors.
23
* 4. Neither the name of the University nor the names of its contributors
24
* may be used to endorse or promote products derived from this software
25
* without specific prior written permission.
26
*
27
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
28
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
31
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37
* SUCH DAMAGE.
38
*
39
* @(#)dc7085cons.h 8.1 (Berkeley) 6/10/93
40
*
41
* dc7085.h --
42
*
43
* Definitions for the dc7085 chip.
44
*
45
* Copyright (C) 1989 Digital Equipment Corporation.
46
* Permission to use, copy, modify, and distribute this software and
47
* its documentation for any purpose and without fee is hereby granted,
48
* provided that the above copyright notice appears in all copies.
49
* Digital Equipment Corporation makes no representations about the
50
* suitability of this software for any purpose. It is provided "as is"
51
* without express or implied warranty.
52
*
53
* from: Header: /sprite/src/kernel/dev/ds3100.md/RCS/dc7085.h,
54
*
55
* v 1.4 89/08/15 19:52:46 rab Exp SPRITE (DECWRL)
56
*/
57
58
#ifndef _PMAX_DC7085CONS_H_
59
#define _PMAX_DC7085CONS_H_
60
61
typedef
volatile
struct
dc7085regs
{
62
u_short
dc_csr
;
/* control and status (R/W) */
63
u_short
pad0
[3];
64
short
dc_rbuf_lpr
;
/* receiver data (R), line params (W) */
65
u_short
pad1
[3];
66
u_short
dc_tcr
;
/* transmitter control (R/W) */
67
u_short
pad2
[3];
68
u_short
dc_msr_tdr
;
/* modem status (R), transmit data (W) */
69
}
dcregs
;
70
#define dc_rbuf dc_rbuf_lpr
71
#define dc_lpr dc_rbuf_lpr
72
#define dc_msr dc_msr_tdr
73
#define dc_tdr dc_msr_tdr
74
75
/*
76
* Control status register bits.
77
*/
78
#define CSR_TRDY 0x8000
79
#define CSR_TIE 0x4000
80
#define CSR_TX_LINE_NUM 0x0300
81
#define CSR_RDONE 0x0080
82
#define CSR_RIE 0x0040
83
#define CSR_MSE 0x0020
84
#define CSR_CLR 0x0010
85
#define CSR_MAINT 0x0008
86
87
/*
88
* Receiver buffer register bits.
89
*/
90
#define RBUF_DVAL 0x8000
91
#define RBUF_OERR 0x4000
92
#define RBUF_FERR 0x2000
93
#define RBUF_PERR 0x1000
94
#define RBUF_LINE_NUM 0x0300
95
#define RBUF_LINE_NUM_SHIFT 8
96
#define RBUF_CHAR 0x00FF
97
98
/*
99
* Transmit control register values.
100
*/
101
#define TCR_DTR2 0x400
102
#define TCR_EN3 0x008
103
#define TCR_EN2 0x004
104
#define TCR_EN1 0x002
105
#define TCR_EN0 0x001
106
107
#define TCR_RTS2 0x800
108
#define TCR_RTS3 0x200
109
#define TCR_DTR3 0x100
110
111
/*
112
* Line parameter register bits.
113
*/
114
#define LPR_RXENAB 0x1000
115
#define LPR_B50 0x0000
116
#define LPR_B75 0x0100
117
#define LPR_B110 0x0200
118
#define LPR_B134 0x0300
119
#define LPR_B150 0x0400
120
#define LPR_B300 0x0500
121
#define LPR_B600 0x0600
122
#define LPR_B1200 0x0700
123
#define LPR_B1800 0x0800
124
#define LPR_B2000 0x0900
125
#define LPR_B2400 0x0A00
126
#define LPR_B3600 0x0B00
127
#define LPR_B4800 0x0C00
128
#define LPR_B7200 0x0D00
129
#define LPR_B9600 0x0E00
130
#define LPR_B19200 0x0F00
131
#define LPR_B38400 0x0F00
132
#define LPR_OPAR 0x0080
133
#define LPR_PARENB 0x0040
134
#define LPR_2_STOP 0x0020
135
#define LPR_8_BIT_CHAR 0x0018
136
#define LPR_7_BIT_CHAR 0x0010
137
#define LPR_6_BIT_CHAR 0x0008
138
#define LPR_5_BIT_CHAR 0x0000
139
140
/*
141
* Modem status register bits.
142
*/
143
#define MSR_DSR2 0x0200
144
145
#define MSR_RI2 0x0800
146
#define MSR_CD2 0x0400
147
#define MSR_CTS2 0x0100
148
#define MSR_RI3 0x0008
149
#define MSR_CD3 0x0004
150
#define MSR_DSR3 0x0002
151
#define MSR_CTS3 0x0001
152
153
/*
154
* The four serial ports.
155
*/
156
#define DCKBD_PORT 0
157
#define DCMOUSE_PORT 1
158
#define DCCOMM_PORT 2
159
#define DCPRINTER_PORT 3
160
161
/* bits in dm lsr, copied from dmreg.h */
162
#define DML_DSR 0000400
/* data set ready, not a real DM bit */
163
#define DML_RNG 0000200
/* ring */
164
#define DML_CAR 0000100
/* carrier detect */
165
#define DML_CTS 0000040
/* clear to send */
166
#define DML_SR 0000020
/* secondary receive */
167
#define DML_ST 0000010
/* secondary transmit */
168
#define DML_RTS 0000004
/* request to send */
169
#define DML_DTR 0000002
/* data terminal ready */
170
#define DML_LE 0000001
/* line enable */
171
172
#endif
/* !_PMAX_DC7085CONS_H_ */
dc7085regs::dc_csr
u_short dc_csr
Definition:
dc7085.h:62
dcregs
volatile struct dc7085regs dcregs
dc7085regs::dc_msr_tdr
u_short dc_msr_tdr
Definition:
dc7085.h:68
dc7085regs::pad2
u_short pad2[3]
Definition:
dc7085.h:67
dc7085regs::dc_rbuf_lpr
short dc_rbuf_lpr
Definition:
dc7085.h:64
dc7085regs::dc_tcr
u_short dc_tcr
Definition:
dc7085.h:66
dc7085regs
Definition:
dc7085.h:61
dc7085regs::pad1
u_short pad1[3]
Definition:
dc7085.h:65
dc7085regs::pad0
u_short pad0[3]
Definition:
dc7085.h:63
Generated on Tue Mar 24 2020 14:04:48 for GXemul by
1.8.17