Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ tty(4spp) — UMIPS/BSD System Programmer's Package 2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

sable(1spp)

TTY(4spp)

NAME

tty − Signetics 2681 uart driver or sable uart emulation driver

SYNOPSIS

Signetics 2681 configuration entry:
{
"tty",_s2681init,_s2681open,
_s2681strategy, _nulldev,_s2681ioctl,
DTTYPE_CHAR|DTTYPE_CONS,
DTFS_NONE,"console uart"
}
Sable uart emulation configuration entry:
{
"tty",_sconsinit,_sconsopen,
_sconsstrategy, _nulldev,_sconsioctl,
DTTYPE_CHAR|DTTYPE_CONS,
DTFS_NONE,"console uart"
}

DESCRIPTION

Tty refers to the either the Signetics 2681 uart driver or the sable uart emulation driver.  The 2681 driver is used when the standalone library is built for use on actual hardware, the sable emulation driver is used when the standalone library is built for use with sable. 

The 2681 driver currently handles only uart 0 on the R2300 cpu board.  Controller 0 refers to uart port A, controller 1 refers to uart port B.  The baud rate for uart port A is determined by the prom monitor environment variable $lbaud; the baud rate for uart port B is determined by the prom monitor environment variable $rbaud.  The following baud rates are recognized: 75, 110, 134, 150, 300, 600, 1200, 1800, 2400, 4800, 9600, and 19200.  If no baud rate or an illegal baud rate is set, port A will be set to 9600 baud, port B will be set to 1200 baud.  For all baud rates, 8 bits of data with no parity are transmitted, parity is not checked on received data.  For all baud rates except 110, 1 stop bit is transmitted; for 110 baud 2 stop bits are transmitted.  If either port A or port B receives a break that port will cycle between the following baud rates: 110, 300, 1200, 2400, 4800, 9600, and 19200. 

The sable uart emulation driver provides a console interface while operating with the sable simulator.  See sable(1spp) for more details.

REGISTERS

On the R2300 cpu board the 2681 control registers are based at physical address 0x1e008002; each byte-wide control register has 3 pad bytes associated with it.  See the R2300 CPU Board Product Description for more details. 

IOCTLS

The 2681 driver supports the following ioctl’s:

ioctl(fd, FIOCSCAN, 0)

Scan the uart for pending input; if found move the input to tty input buffer, process any special characters (see intro(1spp) and intro(3spp)).

ioctl(fd, TIOCRAW, flag)

If flag is non-zero, disable processing of special characters Control-Z and Control-D.  If flag is zero, enable processing of special characters Control-Z and Control-D.  Note that special character processing of Control-S, Control-Q, and Control-C is not affected by "raw" mode. 

ioctl(fd, TIOCFLUSH, 0)

Flush current contents of tty input buffer. 

ioctl(fd, TIOCREOPEN, 0)

Perform uart initialization sequence.  This is necessary to cause baud rates to change after changing environment variables $lbaud or $rbaud. 

DIAGNOSTICS

Illegal lbaud value: %s
An illegal baud rate value was assigned to the $lbaud environment variable

Illegal rbaud value: %s
An illegal baud rate value was assigned to the $rbaud environment variable

s2681cons bad function
An internal error was detected within the 2681 driver

2681 overrun
Input overflowed the 2681 input silo.  Reduce input rate or perform TIOCSCAN ioctl more frequently.

BUGS

It would be more correct to consider uart ports A and B as units rather than controllers.  It was done this way to simplify typing. 

SEE ALSO

sable(1spp), Signetics 2681 data sheet

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026