Technical data
SunOS 5.5 Devices stc(7D)
The possible cmd values, defined in /usr/include/sys/stcio.h, are
STAT_CLEAR clear the line statistics
STAT_GET get the linestatistics
The STC_GSTATS ioctl works only on the SPC/S control port.
SOFTCAR, DTR
and CTS/RTS
FLOW CONTROL
Several methods may be used to enableor disable soft carrier on a particular serial line.
The non-programmatic method is to edit the /kernel/drv/stc.conf file. For this change to
take effect, the machine must be rebooted. See the next section, SETTING DEFAULT
LINE PARAMETERS, for more information on this method. From within an application
program, you can enable or disable the recognition of carrier on a particular line by issu-
ing theTIOCGSOFTCAR ioctl( ) to the driver.
The default mode of operation for the DTR signal is to assert it on the first open() of a
serial line and, if HUPCL is set, to de-assert it on the last close(). To change the operation
of this feature, issue the set on the /kernel/drv/stc.conf parameter flags field bit
DTR_ASSERT.
SETTING
DEFAULT LINE
PARAMETERS
Many default parameters of the serial and parallel ports can be changed using the
/kernel/drv/stc.conf file. The format of a line in the stc.conf file is:
device_tag=token[=value][:token[=value]]
For serial ports, the device_tag is stc_n, where n is between 0 and the maximum number of
serial ports used by the driver. The token and parameters that follow it apply to both the
/dev/term/n entries and /dev/cua/n entries.
For parallel ports, the device_tag is stc_pn, where n is between 0 and the number of paral-
lel ports driven by stc.
The token[=value] specifies a token, and if the token takes a value, the value to assigned.
Tokens that don’t take a value are considered boolean. If boolean tokens don’t appear in
the stc.conf file, they will be cleared by the driver. If these tokens appear in the stc.conf
file, they will be set by the driver.
Tokens that take parameters must have a parameter specified in the token=value couplet
in the stc.conf file. If no parameter or an invalid parameter is specified, the driver will
ignore the token and revert to using the driver’s default value.
Tokens for Serial
Ports
Valid boolean tokens for serial ports are:
soft_carrier- enables the soft carrier on the specified line. When the soft carrier is set,
transitions on the carrier detect line will be ignored.
dtr_assert- causes the DTR to be asserted on the next open of the port.
dtr_force- causes DTR to be continuously asserted. it overrides any other DTR
operations and ioctl calls.
dtr_close- use alternate semantics when dealing withDTR in close. If this is clear,
DTR will drop on the close of the port. If this is set, DTR will not drop
on close() if TS_SOFTCAR (see termiox(7I)) is set in the t_flags.
modified 2 Aug 1993 7D-317










