com(7) DG/UX R4.11MU05 com(7)
NAME
com - Com Port Asynchronous Receiver/Transmitter (Intel Only)
SYNOPSIS
com(node-id,port)
DESCRIPTION
This is the Asynchronous Receiver/Transmitter driver for the COM
ports.
To configure a com port, you must add a device name entry of the form
described above to the DG/UX system configuration file. The
parameters in a device name have the following meanings:
· The node-id parameter is currently not used and, if set, should
be set to 0.
· The port parameter is a hexadecimal number in the range 1 through
4 that distinguishes the various instances of the controller that
are available.
Com serial ports present the standard DG/UX terminal interface
described in termio(7).
The termio structure c_cflags option EXTB is not available. PAREXT
is not supported. Differing input and output baud rates are not
supported. The stty options for hardware flow control via CD (cdxon)
and isochronous hardware flow control (isxoff) are not supported, nor
are the CDXON or ISXOFF flag of the x_hflag field of the termiox
structure.
For com ports with a built in fifo, the ioctl TS_COM_FIFO_DISABLE
using streams I_STR ioctl interface can be used to turn off the fifo.
The I_STR ioctl TS_COM_FIFO_ENABLE can be used to turn the fifo back
on again. The I_STR ioctl TS_COM_FIFO_STATUS can be used to
determine the status of the fifo. The fifo is turned on by default.
The fifo state is persistent across opens and closes.
/* Example of ISTR/TSCOMFIFODISABLE to disable internal fifo */
#include <stdio.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <stropts.h>
#include <fcntl.h>
#define IOCTLTIMEOUT 60 /* An arbitrarily long time to wait */
main()
{
int ttyfd;
int status;
tscomfifostatustype fifostatus;
struct strioctl streamioctl;
ttyfd = open("/dev/async/line/com(0,3)", ORDWR | ONONBLOCK, 0);
fifostatus.status = -1; /* arbitrary value */
streamioctl.iccmd = TSCOMFIFODISABLE; /* disable fifo */
streamioctl.icdp = (char *)&fifostatus;
streamioctl.iclen = sizeof(tscomfifostatustype);
streamioctl.ictimout = IOCTLTIMEOUT;
status = ioctl( ttyfd, ISTR, &streamioctl);
if (fifostatus.status == TSCOMFIFOENABLED) {
printf("The fifo was previously enabled.\n");
}
else {
printf("The fifo was previously disabled.\n");
}
}
FILES
When a com controller is configured, it creates a character-special
device node for the serial port, using the pathname:
/dev/async/line/com(node-id,port)
The com(0,4) port I/O address space conflicts with some graphics
cards.
The chk.devlink command is responsible for creating and maintaining
an additional link to each port device node, with a pathname of the
form /dev/tty[0-9]*. See the chk.devlink(1M) and devlinktab(4M) man
pages for details.
The IO addresses and IRQ lines for the com ports in a DG/UX system
are typically as follows:
Com Port I/O Address IRQ
com(0,1) 0x3F8 - 0x3FF 4
com(0,2) 0x2F8 - 0x2FF 3
com(0,3) 0x3E8 - 0x3EF 5
com(0,4) 0x2E8 - 0x2EF 7
EXAMPLES
The following entries in a DG/UX configuration file configure the
first two COM devices.
com(0,1)
com(0,2)
SEE ALSO
termio(7), termiox(7), streamio(7), chk.devlink(1M), devlinktab(4M).
Licensed material--property of copyright holder(s)