2 * Copyright (c) 2001 Brian Somers <brian@Awfulhak.org>
3 * based on work by Slawa Olhovchenkov
4 * John Prince <johnp@knight-trosoft.com>
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * $FreeBSD: src/sys/dev/digi/digireg.h,v 1.3 2003/08/07 15:04:24 jhb Exp $
30 * $DragonFly: src/sys/dev/serial/digi/digireg.h,v 1.1 2004/12/22 09:42:47 joerg Exp $
35 volatile u_short cout
;
36 volatile u_short cstart
;
37 volatile u_short cmax
;
39 volatile u_short eout
;
40 volatile u_short istart
;
41 volatile u_short imax
;
46 volatile u_short tpjmp
;
47 volatile u_short tcjmp
;
48 volatile u_short fil1
;
49 volatile u_short rpjmp
;
51 volatile u_short tseg
;
53 volatile u_short tout
;
54 volatile u_short tmax
;
56 volatile u_short rseg
;
58 volatile u_short rout
;
59 volatile u_short rmax
;
61 volatile u_short tlow
;
62 volatile u_short rlow
;
63 volatile u_short rhigh
;
64 volatile u_short incr
;
67 volatile u_short edelay
;
68 volatile u_short blen
;
69 volatile u_short btime
;
71 volatile u_short iflag
;
72 volatile u_short oflag
;
73 volatile u_short cflag
;
74 volatile u_short gmask
;
77 volatile u_short delay
;
78 volatile u_short imask
;
79 volatile u_short tflush
;
81 volatile u_char _1
[16];
85 volatile u_char bstat
;
86 volatile u_char tbusy
;
87 volatile u_char iempty
;
89 volatile u_char idata
;
90 volatile u_char eflag
;
92 volatile u_char tflag
;
93 volatile u_char rflag
;
94 volatile u_char xmask
;
96 volatile u_char mstat
;
97 volatile u_char mchange
;
99 volatile u_char lstat
;
101 volatile u_char mtran
;
102 volatile u_char orun
;
103 volatile u_char startca
;
104 volatile u_char stopca
;
105 volatile u_char startc
;
106 volatile u_char stopc
;
107 volatile u_char vnext
;
108 volatile u_char hflow
;
110 volatile u_char fillc
;
111 volatile u_char ochar
;
112 volatile u_char omask
;
115 volatile u_char _3
[28];
118 #define SRXLWATER 0xe0
119 #define SRXHWATER 0xe1
122 #define RESUMETX 0xe4
123 #define SAUXONOFFC 0xe6
124 #define SENDBREAK 0xe8
125 #define SETMODEM 0xe9
126 #define SETIFLAGS 0xeA
128 #define STXLWATER 0xeC
130 #define RESUMERX 0xeF
131 #define RESETCHAN 0xf0
132 #define SETBUFFER 0xf2
133 #define SETCOOKED 0xf3
134 #define SETHFLOW 0xf4
135 #define SETCFLAGS 0xf5
136 #define SETVNEXT 0xf6
137 #define SETBSLICE 0xf7
138 #define SETRSMODE 0xfd
139 #define SETCMDACK 0xfe
142 #define BREAK_IND 0x01
143 #define LOWTX_IND 0x02
144 #define EMPTYTX_IND 0x04
145 #define DATA_IND 0x08
146 #define MODEMCHG_IND 0x20
147 #define RECV_OVR_IND 0x40
148 #define CMD_ACK_IND 0x40
149 #define UART_OVR_IND 0x80
151 #define ALL_IND (BREAK_IND|LOWTX_IND|EMPTYTX_IND|DATA_IND|MODEMCHG_IND)
153 #define FEPTIMEOUT 2000
161 /* #define FEPMASK 0x4 */
163 #define BOTWIN 0x100L
164 #define TOPWIN 0xFF00L
165 #define MISCGLOBAL 0x0C00L
166 #define FEPCODESEG 0x0200L
168 /* #define BIOSCODE 0xff800 */ /* Window 15, offset 7800h */
169 #define FEPCODE 0x0d000
171 #define FEP_CSTART 0x400L
172 #define FEP_CMAX 0x800L
173 #define FEP_ISTART 0x800L
174 #define FEP_IMAX 0xC00L
176 #define FEP_CIN 0xD10L
177 #define FEP_GLOBAL 0xD10L
178 #define FEP_EIN 0xD18L
179 #define FEPSTAT 0xD20L
180 #define CHANSTRUCT 0x1000L
181 #define RXTXBUF 0x4000L
183 #define BIOSOFFSET 0x1000L
184 #define BIOSCODE 0xf800L
185 #define FEPOFFSET 0x2000L
188 #define FEP_CSIZE 0x000030
189 #define FEP_CS5 0x000000
190 #define FEP_CS6 0x000010
191 #define FEP_CS7 0x000020
192 #define FEP_CS8 0x000030
193 #define FEP_CSTOPB 0x000040
194 #define FEP_CREAD 0x000080
195 #define FEP_PARENB 0x000100
196 #define FEP_PARODD 0x000200
197 #define FEP_CLOCAL 0x000800
198 #define FEP_FASTBAUD 0x000400
201 #define FEP_IGNBRK 0000001
202 #define FEP_BRKINT 0000002
203 #define FEP_IGNPAR 0000004
204 #define FEP_PARMRK 0000010
205 #define FEP_INPCK 0000020
206 #define FEP_ISTRIP 0000040
207 #define FEP_IXON 0002000
208 #define FEP_IXANY 0004000
209 #define FEP_IXOFF 0010000