1 /*
2 * Mach Operating System
3 * Copyright (c) 1993,1991,1990,1989 Carnegie Mellon University
4 * All Rights Reserved.
5 *
6 * Permission to use, copy, modify and distribute this software and its
7 * documentation is hereby granted, provided that both the copyright
8 * notice and this permission notice appear in all copies of the
9 * software, derivative works or modified versions, and any portions
10 * thereof, and that both notices appear in supporting documentation.
11 *
12 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
13 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
14 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
15 *
16 * Carnegie Mellon requests users of this software to return to
17 *
18 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
19 * School of Computer Science
20 * Carnegie Mellon University
21 * Pittsburgh PA 15213-3890
22 *
23 * any improvements or extensions that they make and grant Carnegie Mellon
24 * the rights to redistribute these changes.
25 */
26 /*
27 * HISTORY
28 * $Log: serial_defs.h,v $
29 * Revision 2.4 93/11/17 16:14:36 dbg
30 * Added ANSI function prototypes.
31 * [93/10/13 dbg]
32 *
33 * Revision 2.3 93/03/26 17:58:27 mrt
34 * Rid of dev_t.
35 * [93/03/19 af]
36 *
37 * Revision 2.2 91/08/24 11:53:23 af
38 * Created.
39 * [91/07/07 af]
40 *
41 */
42 /*
43 * File: serial_defs.h
44 * Author: Alessandro Forin, Carnegie Mellon University
45 * Date: 7/91
46 *
47 * Generic console driver for serial-line based consoles.
48 */
49
50 #ifndef _CHIPS_SERIAL_DEFS_H_
51 #define _CHIPS_SERIAL_DEFS_H_
52
53 /*
54 * Common defs
55 */
56
57 #include <mach/boolean.h>
58 #include <mach/machine/vm_types.h>
59 #include <chips/busses.h>
60 #include <device/tty.h>
61
62 extern boolean_t
63 (*console_probe)(
64 vm_offset_t addr,
65 struct bus_device *d);
66
67 extern void
68 (*console_param)(
69 struct tty *tp,
70 int line);
71
72 extern void
73 (*console_start)(
74 struct tty *tp);
75
76 extern void
77 (*console_putc)(
78 int unit,
79 int line,
80 int ch);
81
82 extern int
83 (*console_getc)(
84 int unit,
85 int line,
86 boolean_t wait,
87 boolean_t raw);
88
89 extern void
90 (*console_pollc)(
91 int unit,
92 boolean_t poll);
93
94 extern int
95 (*console_mctl)(
96 int dev,
97 int bits,
98 int how);
99
100 extern void
101 (*console_softCAR)(
102 int unit,
103 int line,
104 boolean_t on);
105
106 extern int cngetc(void);
107 extern int cnmaygetc(void);
108 extern void cnputc(int);
109 extern void cnpollc(boolean_t);
110 extern void rcputc(int);
111
112 extern struct tty *console_tty[];
113 extern int rcline, cnline;
114 extern int console;
115
116 /* Simple one-char-at-a-time scheme */
117 extern int
118 cons_simple_tint(
119 int ttyno,
120 boolean_t all_sent);
121
122 extern void
123 cons_simple_rint(
124 int ttyno,
125 int line,
126 int c,
127 int err);
128
129 #define CONS_ERR_PARITY 0x1000
130 #define CONS_ERR_BREAK 0x2000
131 #define CONS_ERR_OVERRUN 0x4000
132
133 #endif /* _CHIPS_SERIAL_DEFS_H_ */
134
Cache object: 540c8d26050c0ef801b0514349138537
|