1zs(7D) Devices zs(7D)
2
3
4
6 zs - Zilog 8530 SCC serial communications driver
7
9 #include <fcntl.h>
10
11
12 #include <sys/termios.h>
13
14
15 open("/dev/term/n", mode);
16
17
18 open("/dev/ttyn", mode);
19
20
21 open("/dev/cua/n", mode);
22
23
25 The Zilog 8530 provides two serial input/output channels capable of
26 supporting a variety of communication protocols. A typical system uses
27 two or more of these devices to implement essential functions, includ‐
28 ing RS-423 ports (which also support most RS-232 equipment), and the
29 console keyboard and mouse devices.
30
31
32 The zs module is a loadable STREAMS driver that provides basic support
33 for the Zilog 8530 hardware and basic asynchronous communication sup‐
34 port. The driver supports the termio(7I) device control functions spec‐
35 ified by flags in the c_cflag word of the termios structure and by the
36 IGNBRK, IGNPAR, PARMRK, or INPCK flags in the c_iflag word. All other
37 termio(7I) functions must be performed by STREAMS modules pushed atop
38 the driver. When a device is opened, the ldterm(7M) and ttcompat(7M)
39 STREAMS modules are automatically pushed on top of the stream, provid‐
40 ing the standard termio(7I) interface.
41
42
43 The character-special devices /dev/term/a and /dev/term/b are used to
44 access the two serial ports on the CPU board.
45
46
47 Valid name space entries are /dev/cua/[a-z], /dev/term/[a-z] and
48 /dev/tty[a-z]. The number of entries used in a name space are machine
49 dependent.
50
51
52 To allow a single tty line to be connected to a modem and used for both
53 incoming and outgoing calls, a special feature is available that is
54 controlled by the minor device number. By accessing character-special
55 devices with names of the form /dev/cua/[n], it is possible to open a
56 port without the Carrier Detect signal being asserted, either through
57 hardware or an equivalent software mechanism. These devices are com‐
58 monly known as dial-out lines.
59
60
61 Once a /dev/cua/[n] line is opened, the corresponding tty line cannot
62 be opened until the /dev/cua/n line is closed. A blocking open will
63 wait until the /dev/cua/[n] line is closed (which will drop Data Termi‐
64 nal Ready, and Carrier Detect) and carrier is detected again. A non-
65 blocking open will return an error. If the tty line has been opened
66 successfully (usually only when carrier is recognized on the modem) ,
67 the corresponding /dev/cua/[n] line cannot be opened. This allows a
68 modem to be attached to /dev/term/[n] (renamed from /dev/tty[n]) and
69 used for dial-in (by enabling the line for login in /etc/inittab) and
70 also used for dial-out (by tip(1) or uucp(1C)) as /dev/cua/[n] when no
71 one is logged in on the line.
72
73 Note -
74
75 This module is affected by the setting of specific eeprom variables.
76 For information on parameters that are persistent across reboots, see
77 the eeprom(1M) man page.
78
80 The zs module supports the standard set of termio ioctl() calls.
81
82
83 If the CRTSCTS flag in the c_cflag field is set, output will be gener‐
84 ated only if CTS is high; if CTS is low, output will be frozen. If the
85 CRTSCTS flag is clear, the state of CTS has no effect.
86
87
88 If the CRTSXOFF flag in the c_cflag field is set, input will be
89 received only if RTS is high; if RTS is low, input will be frozen. If
90 the CRTSXOFF flag is clear, the state of RTS has no effect.
91
92
93 The termios CRTSCTS (respectively CRTSXOFF) flag and termiox CTSXON
94 (respectively RTSXOFF) can be used interchangeably.
95
96
97 Breaks can be generated by the TCSBRK, TIOCSBRK, and TIOCCBRK ioctl()
98 calls.
99
100
101 The state of the DCD, CTS, RTS, and DTR interface signals may be
102 queried through the use of the TIOCM_CAR, TIOCM_CTS, TIOCM_RTS, and
103 TIOCM_DTR arguments to the TIOCMGET ioctl command, respectively. Due
104 to hardware limitations, only the RTS and DTR signals may be set
105 through their respective arguments to the TIOCMSET, TIOCMBIS, and
106 TIOCMBIC ioctl commands.
107
108
109 The input and output line speeds may be set to any of the speeds sup‐
110 ported by termio. The input and output line speeds cannot be set inde‐
111 pendently; for example, when you set the the output speed, the input
112 speed is automatically set to the same speed.
113
114
115 When the driver is used to service the serial console port, it supports
116 a BREAK condition that allows the system to enter the debugger or the
117 monitor. The BREAK condition is generated by hardware and it is usually
118 enabled by default. A BREAK condition originating from erroneous elec‐
119 trical signals cannot be distinguished from one deliberately sent by
120 remote DCE. The Alternate Break sequence can be used to remedy this.
121
122
123 Due to a risk of incorrect sequence interpretation, SLIP and certain
124 other binary protocols should not be run over the serial console port
125 when Alternate Break sequence is in effect. Although PPP is a binary
126 protocol, it is able to avoid these sequences using the ACCM feature in
127 RFC 1662. For Solaris PPP 4.0, you do this by adding the following line
128 to the /etc/ppp/options file (or other configuration files used for the
129 connection; see pppd(1M) for details):
130
131 asyncmap 0x00002000
132
133
134
135 By default, the Alternate Break sequence is three characters: carriage
136 return, tilde and control-B (CR ~ CTRL-B), but may be changed by the
137 driver. For more information on breaking (entering the debugger or mon‐
138 itor), see kbd(1) and kb(7M).
139
141 An open will fail under the following conditions:
142
143 ENXIO The unit being opened does not exist.
144
145
146 EBUSY The dial-out device is being opened and the dial-in device is
147 already open, or the dial-in device is being opened with a no-
148 delay open and the dial-out device is already open.
149
150
151 EBUSY The port is in use by another serial protocol.
152
153
154 EBUSY The unit has been marked as exclusive-use by another process
155 with a TIOCEXCL ioctl() call.
156
157
158 EINTR The open was interrupted by the delivery of a signal.
159
160
162 /dev/cua/[a-z] dial-out tty lines
163
164
165 /dev/term/[a-z] dial-in tty lines
166
167
168 /dev/tty[a-z] binary compatibility package device names
169
170
172 See attributes(5) for descriptions of the following attributes:
173
174
175
176
177 ┌─────────────────────────────┬─────────────────────────────┐
178 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
179 ├─────────────────────────────┼─────────────────────────────┤
180 │Architecture │SPARC │
181 └─────────────────────────────┴─────────────────────────────┘
182
184 eeprom(1M), kadb(1M), tip(1), cu(1C), uucp(1C), ports(1M), pppd(1M),
185 ioctl(2), open(2), attributes(5), zsh(7D), termio(7I), kb(7M),
186 ldterm(7M), ttcompat(7M)
187
189 zsn: silo overflow.
190
191 The Zilog 8530 character input silo overflowed before it could be
192 serviced.
193
194
195 zsn: ring buffer overflow.
196
197 The driver's character input ring buffer overflowed before it could
198 be serviced.
199
200
201
202
203SunOS 5.11 16 Jul 2009 zs(7D)