zs(7D)
NAME
zs − Zilog 8530 SCC serial communications driver
SYNOPSIS
#include <fcntl.h>
#include <sys/termios.h>
open("/dev/term/n", mode);
open("/dev/ttyn", mode);
open("/dev/cua/n", mode);
AVAILABILITY
SPARC
DESCRIPTION
The Zilog 8530 provides two serial input/output channels that are capable of supporting a variety of communication protocols. A typical system uses two or more of these devices to implement essential functions, including RS-423 ports (which also support most RS-232 equipment), and the console keyboard and mouse devices.
The zs module is a loadable STREAMS driver that provides basic support for the 8530 hardware, together with basic asynchronous communication support. The driver supports those termio(7I) device control functions specified by flags in the c_cflag word of the termios structure and by the IGNBRK, IGNPAR, PARMRK, or INPCK flags in the c_iflag word of the termios structure. All other termio(7I) functions must be performed by STREAMS modules pushed atop the driver. When a device is opened, the ldterm(7M) and ttcompat(7M) STREAMS modules are automatically pushed on top of the stream, providing the standard termio(7I) interface.
The character-special devices /dev/term/a and /dev/term/b are used to access the two serial ports on the CPU board.
Note: /dev/cua/[a-z], /dev/term/[a-z] and /dev/tty[a-z] are valid name space entries. The number of entries used in this name space are machine dependent.
The /dev/ttyn device names only exist if the binary compatibility package is installed. The /dev/ttyn device names are created by the ucblinks command. This command is only available via the binary compatibility package.
To allow a single tty line to be connected to a modem and used for both incoming and outgoing calls, a special feature, controlled by the minor device number, is available. By accessing character-special devices with names of the form /dev/cua/n it is possible to open a port without the Carrier Detect signal being asserted, either through hardware or an equivalent software mechanism. These devices are commonly known as dial-out lines.
Once a /dev/cua/n line is opened, the corresponding tty line cannot be opened until the /dev/cua/n line is closed; a blocking open will wait until the /dev/cua/n line is closed (which will drop Data Terminal Ready, after which Carrier Detect will usually drop as well) and carrier is detected again, and a non-blocking open will return an error. Also, if the tty line has been opened successfully (usually only when carrier is recognized on the modem) the corresponding /dev/cua/n line cannot be opened. This allows a modem to be attached to, for example, /dev/term/n (renamed from /dev/ttyn) and used for dial-in (by enabling the line for login in /etc/inittab) and also used for dial-out (by tip(1) or uucp(1C)) as /dev/cua/n when no one is logged in on the line.
IOCTLS
The standard set of termio ioctl() calls are supported by zs.
If the CRTSCTS flag in the c_cflag field is set, output will be generated only if CTS is high; if CTS is low, output will be frozen. If the CRTSCTS flag is clear, the state of CTS has no effect.
If the CRTSXOFF flag in the c_cflag field is set, input will be received only if RTS is high; if RTS is low, input will be frozen. If the CRTSXOFF flag is clear, the state of RTS has no effect.
The termios CRTSCTS (respectively CRTSXOFF) flag and termiox CTSXON (respectively RTSXOFF) can be used interchangeably.
Breaks can be generated by the TCSBRK, TIOCSBRK, and TIOCCBRK ioctl() calls.
The state of the DCD, CTS, RTS, and DTR interface signals may be queried through the use of the TIOCM_CAR, TIOCM_CTS, TIOCM_RTS, and TIOCM_DTR arguments to the TIOCMGET ioctl command, respectively. Due to hardware limitations, only the RTS and DTR signals may be set through their respective arguments to the TIOCMSET, TIOCMBIS, and TIOCMBIC ioctl commands.
The input and output line speeds may be set to any of the speeds supported by termio. The speeds cannot be set independently; when the output speed is set, the input speed is set to the same speed.
ERRORS
An open() will fail if:
ENXIO The unit being opened does not exist.
EBUSY The dial-out device is being opened and the dial-in device is already open, or the dial-in device is being opened with a no-delay open and the dial-out device is already open.
EBUSY The port is in use by another serial protocol.
EBUSY The unit has been marked as exclusive-use by another process with a TIOCEXCL ioctl() call.
EINTR The open was interrupted by the delivery of a signal.
FILES
/dev/cua/[a-z] dial-out tty lines
/dev/term/[a-z] dial-in tty lines
/dev/tty[a-z] binary compatibility package device names
SEE ALSO
cu(1C), tip(1), ucblinks(1B), uucp(1C), ports(1M), ioctl(2), open(2), ldterm(7M), termio(7I), ttcompat(7M), zsh(7D)
Binary Compatibility Guide
DIAGNOSTICS
zsn: silo overflow.
The 8530 character input silo overflowed before it could be serviced.
zsn: ring buffer overflow.
The driver’s character input ring buffer overflowed before it could be serviced.
SunOS 5.5.1 — Last change: 2 Mar 1995