1187499Simp/*-
2187499Simp * Copyright (c) Comtrol Corporation <support@comtrol.com>
3187499Simp * All rights reserved.
4187499Simp *
5187499Simp * Redistribution and use in source and binary forms, with or without
6187499Simp * modification, are permitted prodived that the follwoing conditions
7187499Simp * are met.
8187499Simp * 1. Redistributions of source code must retain the above copyright
9187499Simp *    notive, this list of conditions and the following disclainer.
10187499Simp * 2. Redistributions in binary form must reproduce the above copyright
11187499Simp *    notice, this list of conditions and the following disclaimer in the
12187499Simp *    documentation and/or other materials prodided with the distribution.
13187499Simp * 3. All advertising materials mentioning features or use of this software
14187499Simp *    must display the following acknowledgement:
15187499Simp *       This product includes software developed by Comtrol Corporation.
16187499Simp * 4. The name of Comtrol Corporation may not be used to endorse or
17187499Simp *    promote products derived from this software without specific
18187499Simp *    prior written permission.
19187499Simp *
20187499Simp * THIS SOFTWARE IS PROVIDED BY COMTROL CORPORATION ``AS IS'' AND ANY
21187499Simp * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22187499Simp * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23187499Simp * ARE DISCLAIMED.  IN NO EVENT SHALL COMTROL CORPORATION BE LIABLE FOR
24187499Simp * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25187499Simp * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26187499Simp * OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION)
27187499Simp * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28187499Simp * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29187499Simp * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30187499Simp * SUCH DAMAGE.
31187499Simp *
32187499Simp * $FreeBSD: releng/10.3/sys/dev/rp/rpvar.h 183397 2008-09-27 08:51:18Z ed $
33187499Simp */
34187499Simp
35187499Simp/*
36187499Simp * rpvar.h --- RocketPort data structure includes for FreeBSD
37187499Simp */
38187499Simp
39187499Simp#define RP_UNIT(x) dv_unit(x)
40187499Simp#define RP_PORT(x) (dev2unit(x) & 0x3f)
41187499Simp#define MAX_RP_PORTS	128
42187499Simp
43187499Simp
44187499Simpstruct rp_port {
45187499Simp	struct tty *		rp_tty; /* cross reference */
46187499Simp
47187499Simp	unsigned char		state;	/* state of dtr */
48187499Simp
49187499Simp	int			rp_port;
50187499Simp	int			rp_flags;
51187499Simp	int			rp_unit:2;
52187499Simp	int			rp_aiop:2;
53187499Simp	int			rp_chan:3;
54187499Simp	int			rp_intmask;
55187499Simp	int			rp_imask; /* Input mask */
56187499Simp	int			rp_fifo_lw;
57187499Simp	int			rp_restart;
58187499Simp	int			rp_overflows;
59187499Simp	int			rp_rts_iflow:1;
60187499Simp	int			rp_disable_writes:1;
61187499Simp	int			rp_cts:1;
62187499Simp	int			rp_waiting:1;
63187499Simp	int			rp_xmit_stopped:1;
64187499Simp	CONTROLLER_t *		rp_ctlp;
65187499Simp	CHANNEL_t		rp_channel;
66187499Simp	unsigned char		TxBuf[TXFIFO_SIZE];
67187499Simp	unsigned char		RxBuf[RXFIFO_SIZE];
68187499Simp};
69187499Simp
70187499Simp/* Actually not used */
71187499Simp#ifdef notdef
72187499Simpextern struct termios deftermios;
73187499Simp#endif /* notdef */
74187499Simp