device zs0 at obio ? csr 0x20000 flags 3 priority 3 device zs1 at obio ? csr 0x00000 flags 0x103 priority 3
device zs0 at obio ? csr 0x62002000 flags 3 priority 3 device zs1 at obio ? csr 0x62000000 flags 0x103 priority 3
device zs1 at obio ? csr 0xf0000000 flags 0x103 priority 3 device zs2 at obio 3 csr 0xe0000000 flags 3 priority 3
device zs0 at obmem ? csr 0xFC000000 flags 3 irq 9 priority 6
device zs1 at obmem ? csr 0xA0000020 flags 0x103 irq 9 priority 6
#include <fcntl.h> #include <sys/termios.h> open("/dev/ttyn", mode); open("/dev/ttydn", mode); open("/dev/cuan", mode);
The Zilog 8530 provides 2 serial communication ports with full modem control in asynchronous mode. Each port supports termio.4 device control functions specified by flags in the c_cflag word of the termios structure, and the functions specified by the IGNBRK, IGNPAR, PARMRK, and INPCK flags of the c_ciflag word of the termios structure. These functions are performed directly by the zs driver. All other termio.4 functions must be performed by STREAMS modules pushed atop the driver. When a device is opened, the ldterm.4m and ttcompat.4m STREAMS modules are automatically pushed on top of the stream, providing the standard termio.4 interface.
Of the synopsis lines above, the line for zs0 specifies the serial I/O port(s) provided by the CPU board, the line for zs1 specifies the Video Board ports (which are used for keyboard and mouse), the lines for zs2 and zs3 specify the first and second ports on the first SCSI board in a system, and those for zs4 and zs5 specify the first and second ports provided by the second SCSI board in a system, respectively.
Bit i of flags may be specified to say that a line is not properly connected, and that the line i should be treated as hard-wired with carrier always present. Thus specifying flags 0x2 in the specification of zs0 would treat line /dev/ttyb in this way.
Minor device numbers in the range 0 - 11 correspond directly to the normal tty lines and are named /dev/ttya and /dev/ttyb for the two serial ports on the CPU board and /dev/ttysn for the ports on the SCSI boards; n is 0 or 1 for the ports on the first SCSI board, and 2 or 3 for the ports on the second SCSI board.
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, has been added. Minor device numbers in the range 128 - 139 correspond to the same physical lines as those above (that is, the same line as the minor device number minus 128).
A dial-in line has a minor device in the range 0 - 11 and is conventionally renamed /dev/ttydn, where n is a number indicating which dial-in line it is (so that /dev/ttyd0 is the first dial-in line), and the dial-out line corresponding to that dial-in line has a minor device number 128 greater than the minor device number of the dial-in line and is conventionally named /dev/cuan, where n is the number of the dial-in line.
The /dev/cuan lines are special in that they can be opened even when there is no carrier on the line. Once a /dev/cuan line is opened, the corresponding tty line cannot be opened until the /dev/cuan line is closed; a blocking open will wait until the /dev/cuan 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 /dev/ttydn line has been opened successfully (usually only when carrier is recognized on the modem) the corresponding /dev/cuan line can not be opened. This allows a modem to be attached, for example, to /dev/ttyd0 (renamed from /dev/ttya) and used for dial-in (by enabling the line for login in /etc/ttytab) and also used for dial-out (by tip.1c or uucp.1c as /dev/cua0 when no one is logged in on the line. Note: the bit in the flags word in the configuration file (see above) must be zero for this line, which enables hardware carrier detection.
The standard set of termio ioctl() calls are supported by zs.
If the CRTSCTS flag in the c_cflag 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. Breaks can be generated by the TCSBRK, TIOCSBRK, and TIOCCBRK ioctl() calls. The modem control lines TIOCM_CAR, TIOCM_CTS, TIOCM_RTS, and TIOCM_DTR are provided.
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.
An open() will fail if:
Created by unroff & hp-tools. © by Hans-Peter Bischof. All Rights Reserved (1997).
Last modified 21/April/97