xref: /onnv-gate/usr/src/uts/common/sys/pcmcia/pcser_conf.h (revision 0:68f95e015346)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright (c) 1995,2001 by Sun Microsystems, Inc.
24  * All rights reserved.
25  */
26 
27 #ifndef _PCSER_CONF_H
28 #define	_PCSER_CONF_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #ifdef	__cplusplus
33 extern "C" {
34 #endif
35 
36 /*
37  * pcserconf.h - misc stuff
38  */
39 
40 #ifdef	ZIP
41 /*
42  * default setting for the serial lines
43  */
44 static struct pcser_defaults_t pcser_initmodes = {
45 	/* flags */
46 	SDFLAGS,
47 	/* drain_size */
48 	PCSER_DRAIN_BSIZE,
49 	/* pcser_hiwater */
50 	PCSER_HIWATER,
51 	/* pcser_lowwater */
52 	PCSER_LOWWATER,
53 	/* rtpr */
54 	PCSER_RTPR,
55 	/* rx_fifo_thld */
56 	RX_FIFO_SIZE,
57 	/* struct termios */
58 	{
59 		BRKINT|ICRNL|IXON|ISTRIP,		/* iflag */
60 		OPOST|ONLCR|XTABS,			/* oflag */
61 		CFLAGS|TX_BAUD,				/* cflag */
62 		ISIG|ICANON|ECHO,			/* lflag */
63 		{ /* cc[NCCS] */
64 			CINTR, CQUIT, CERASE, CKILL,
65 			CEOF, CEOL, CEOL2, CSWTCH,
66 			CSTART, CSTOP, CSUSP, CDSUSP,
67 			CRPRNT, CFLUSH, CWERASE, CLNEXT,
68 		},
69 	},
70 };
71 #endif	/* ZIP */
72 
73 /*
74  * baud rate conversion table - note that for speeds that we don't
75  *	support, the table entry is 0
76  */
77 unsigned short pcser_baud_table[PCSER_MAX_SPEEDS] = {
78 	0x00000,	/* B0 (hangup line, not really a speed) */
79 	0x00900,	/* B50 */
80 	0x00600,	/* B75 */
81 	0x00417,	/* B110 */
82 	0x00359,	/* B134 */
83 	0x00300,	/* B150 */
84 	0x00240,	/* B200 */
85 	0x00180,	/* B300 */
86 	0x000c0,	/* B600 */
87 	0x00060,	/* B1200 */
88 	0x00040,	/* B1800 */
89 	0x00030,	/* B2400 */
90 	0x00018,	/* B4800 */
91 	0x0000c,	/* B9600 */
92 	0x00006,	/* B19200 */
93 	0x00003,	/* B38400 */
94 	0x00002,	/* B57600 */
95 	0x00000,	/* B76800 */
96 	0x00001,	/* B115200 */
97 	0x00000,	/* B153600 */
98 	0x00000,	/* B230400 */
99 	0x00000,	/* B307200 */
100 	0x00000,	/* B460800 */
101 };
102 
103 /*
104  * ioctl debugging stuff
105  */
106 #ifdef	DEBUG_PCSERIOCTL
107 
108 struct ioc_txt_t {
109 	char	*name;
110 	int	ioc_cmd;
111 };
112 
113 struct ioc_txt_t ioc_txt[] = {
114 	{ "TCSBRK",		TCSBRK },
115 	{ "TCSETSW",		TCSETSW },
116 	{ "TCSETSF",		TCSETSF },
117 	{ "TCSETAW",		TCSETAW },
118 	{ "TCSETAF",		TCSETAF },
119 	{ "TIOCSBRK",		TIOCSBRK },
120 	{ "TIOCCBRK",		TIOCCBRK },
121 	{ "TCGETA",		TCGETA },
122 	{ "TCSETA",		TCSETA },
123 	{ "TCSETAW",		TCSETAW },
124 	{ "TCSETAF",		TCSETAF },
125 	{ "TCXONC",		TCXONC },
126 	{ "TCFLSH",		TCFLSH },
127 	{ "TIOCKBON",		TIOCKBON },
128 	{ "TIOCKBOF",		TIOCKBOF },
129 	{ "KBENABLED",		KBENABLED },
130 	{ "TCDSET",		TCDSET },
131 	{ "RTS_TOG",		RTS_TOG },
132 	{ "TIOCGWINSZ",		TIOCGWINSZ },
133 	{ "TIOCSWINSZ",		TIOCSWINSZ },
134 	{ "TIOCGSOFTCAR",	TIOCGSOFTCAR },
135 	{ "TIOCSSOFTCAR",	TIOCSSOFTCAR },
136 	{ "TCGETS",		TCGETS },
137 	{ "TCSETS",		TCSETS },
138 	{ "TCSANOW",		TCSANOW },
139 	{ "TCSADRAIN",		TCSADRAIN },
140 	{ "TCSAFLUSH",		TCSAFLUSH },
141 	{ "STGET",		STGET },
142 	{ "STSET",		STSET },
143 	{ "STTHROW",		STTHROW },
144 	{ "STWLINE",		STWLINE },
145 	{ "STTSV",		STTSV },
146 	{ "TCGETX",		TCGETX },
147 	{ "TCSETX",		TCSETX },
148 	{ "TCSETXW",		TCSETXW },
149 	{ "TCSETXF",		TCSETXF },
150 	{ "TIOCMSET",		TIOCMSET },
151 	{ "TIOCMBIS",		TIOCMBIS },
152 	{ "TIOCMBIC",		TIOCMBIC },
153 	{ "TIOCMGET",		TIOCMGET },
154 	{ "TIOCFLUSH",		TIOCFLUSH },
155 	{ "TIOCCDTR",		TIOCCDTR },
156 	{ "TIOCSDTR",		TIOCSDTR },
157 	{ (char *)NULL,		0 }
158 };
159 #endif	/* DEBUG_PCSERIOCTL */
160 
161 #ifdef	__cplusplus
162 }
163 #endif
164 
165 #endif	/* _PCSER_CONF_H */
166