Technical data
stc(7D) Devices SunOS 5.5
NAME stc − Serial Parallel Communications driver for SBus
DESCRIPTION The SPC/S SBus communications board consists of eight asynchronous serial ports and
one IBM PS/2-compatible parallel port. The stc driver supports up to 8 SPC/S boards in an
SBus system. Each serial port has full modem control: the CD, DTR, DSR, RTS and CTS
modem control lines are provided, plus flow control is supported in hardware for either
RTS/CTS hardware flow control or DC1/DC3 software flow control. The parallel port is
unidirectional with support for the ACK, STROBE, BUSY, PAPER OUT, SELECT and
ERROR interface signals. Both the serial and parallel ports support those termio(7I) dev-
ice control functions specified by flags in the c_cflag word of the termios(3) structure; in
addition, the serial ports support theIGNPAR, PARMRK, INPCK, IXON, IXANY and IXOFF
flags in the c_iflag word of the termios(3) structure. The latter c_iflag functions are per-
formed by the stc driver for the serial ports. Since the parallel port is a unidirectional,
output-only port, no input termios(3) ( c_iflag ) parameters apply to it. Trying to execute
a nonsensical ioctl() on the parallel port is not recommended. All other termios(3) func-
tions are performed by STREAMS modules pushed atop the driver. When an stc device is
opened, the ldterm(7M) and ttcompat(7M) STREAMS modules are automatically pushed
on top of the stream if they are specified in the /etc/iu.ap file (the default condition), pro-
viding the standard termio(7I) interface.
The device names of the form /dev/term/n or /dev/ttyyn specify the serial I/O ports pro-
vided on the SPC/S board, conventionally as incoming lines. The device names of the
form /dev/cua/n or /dev/ttyzn specify the serial I/O ports provided on the SPC/S board,
conventionally as outgoing lines. The device names of the form /dev/printers/n or
/dev/stclpn specify the parallel port, and the device name of the form /dev/stcn specify a
special control port per 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-191 correspond to the same physical lines as
those in the range 0-63 (that is, the same line as the minor device number minus 128).
A dial-in line has a minor device in the range 0-63 and is conventionally named
/dev/term/n, where n is a number indicatingwhich dial-in line it is (so that /dev/term/0 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 lineand is con-
ventionally named /dev/cua/n, where n is the number of the dial-in line. These devices
will also have the compatibility names /dev/ttyzn.
The /dev/cua/n lines are special in that they can be opened even when there is no carrier
on the line. Once a /dev/cua/n line is opened, the corresponding /dev/term/n 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 DTR, after which DCD will usually drop as
well) and carrier is detected again, and a non-blockingopen will return an error. Also, if
the /dev/term/n line has been opened successfully (usually only when carrier is recog-
nized on the modem) the corresponding /dev/cua/n line can not be opened. This allows a
modem to be attached to /dev/term/0, for example, and used for dial-in (by enablingthe
7D-314 modified 2 Aug 1993










