device mcp0 at vme32d32 ? csr 0x1000000 flags 0x1ffff priority 4 vector mcpintr 0x8b device mcp1 at vme32d32 ? csr 0x1010000 flags 0x1ffff priority 4 vector mcpintr 0x8a device mcp2 at vme32d32 ? csr 0x1020000 flags 0x1ffff priority 4 vector mcpintr 0x89 device mcp3 at vme32d32 ? csr 0x1030000 flags 0x1ffff priority 4 vector mcpintr 0x88 device mcp4 at vme32d32 ? csr 0x2000000 flags 0x1ffff priority 4 vector mcpintr 0xa0 device mcp5 at vme32d32 ? csr 0x2010000 flags 0x1ffff priority 4 vector mcpintr 0xa1 device mcp6 at vme32d32 ? csr 0x2020000 flags 0x1ffff priority 4 vector mcpintr 0xa2 device mcp7 at vme32d32 ? csr 0x2030000 flags 0x1ffff priority 4 vector mcpintr 0xa3
#include <fcntl.h> #include <sys/termios.h> open("/dev/ttyxy", mode); open("/dev/ttydn", mode); open("/dev/cuan", mode);
The Sun MCP (Multiprotocol Communications Processor) supports up to four synchronous serial lines in conjunction with SunLink® Multiple Communication Protocol products.
The Sun ALM-2 Asynchronous Line Multiplexer provides 16 asynchronous serial communication lines with modem control and one Centronics-compatible parallel printer port.
Each port supports those termio.4 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 are performed by the mcp 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.
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 0x0004 in the specification of mcp0 would treat line /dev/ttyh2 in this way.
Minor device numbers in the range 0 - 127 correspond directly to the normal tty lines and are named /dev/ttyXY, where X represents the physical board as one of the characters h, i, j, k, l, m, n, or o, and Y is the line number on the board as a single hexadecimal digit. Thus the first line on the first board is /dev/ttyh0, and the sixteenth line on the third board is /dev/ttyjf.
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 - 255 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 - 127 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 cannot be opened. This allows a modem to be attached, for example, to /dev/ttyd0 (renamed from /dev/ttyh0) and used for dialin (by enabling the line for login in /etc/ttytab) and also used for dialout (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.
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
The speeds cannot be set independently; when the output speed is set,
the input speed is set to the same speed.
The parallel port is Centronics-compatible and is suitable for most common parallel printers. Devices attached to this interface are normally handled by the line printer spooling system, and should not be accessed directly by the user.
The printer devices reside on a separate major device number from the serial devices. Minor device numbers in the range 0 - 7 access the printer, and the recommended naming is /dev/mcpp[0-7].
MCPRIGNSLCT0x02set if interface ignoring SLCT- on open MCPRDIAG 0x04set if printer port is in self-test mode MCPRVMEINT 0x08set if VME bus interrupts enabled MCPRINTPE 0x10print message when out of paper MCPRINTSLCT0x20print message when printer offline MCPRPE 0x40set if device ready, cleared if device out of paper MCPRSLCT 0x80set if device online (Centronics SLCT asserted)
The flags MCPRINTSLCT, MCPRINTPE, and MCPRDIAG may be changed; the other bits are status bits and may not be changed.
The ioctl() calls supported by MCP printer ports are listed below.
Bit 17 of the configuration flags may be specified to say that the interface should ignore Centronics SLCT- and RDY/PE- when attempting to open the device, but this is normally useful only for configuration and troubleshooting: if the SLCT- and RDY lines are not asserted during an actual data transfer (as with a write.2v call), no data is transferred.
Note: pin 4 is used for hardware flow control on ALM-2 ports 0 through 3. These two pins should not be tied together on the ALM end.
Created by unroff & hp-tools. © by Hans-Peter Bischof. All Rights Reserved (1997).
Last modified 21/April/97