|
|
1.1 root 1: .TH TTY 4
2: .CT 2 comm_term
3: .SH NAME
4: tty \- serial line interface drivers
5: .SH SYNOPSIS
6: .B #include <sys/ttyio.h>
7: .SH DESCRIPTION
8: The files
9: .L /dev/tty*
10: refer to serial line devices
11: such as the DZ11.
12: They are normally used in conjunction
13: with the terminal line discipline,
14: .IR ttyld (4).
15: .PP
16: Certain device-related parameters,
17: such as parity and line speed,
18: may be set by
19: .IR ioctl (2)
20: calls:
21: .TF TIOCGDEV
22: .TP
23: .B TIOCGDEV
24: The argument points to a
25: .B ttydevb
26: structure to be filled in with current settings.
27: .TP
28: .B TIOCSDEV
29: The argument points to a
30: .B ttydevb
31: structure from which the parameters are set.
32: .PD
33: .PP
34: The
35: .B ttydevb
36: structure, as defined in
37: .BR <sys/ttyio.h> ,
38: is
39: .PP
40: .EX
41: .ta \w'struct 'u +\w'ttydevb 'u +\w'ispeed; 'u
42: struct ttydevb {
43: char ispeed; /* input speed */
44: char ospeed; /* output speed */
45: short flags; /* mode flags */
46: };
47: .EE
48: .PP
49: The speeds are encoded as follows.
50: Impossible speeds are ignored.
51: .PP
52: .nf
53: .ta \w'B9600 'u +5n
54: \f5B0 0\fP (hang up device)
55: \f5B50 1\fP 50 baud
56: \f5B75 2\fP 75 baud
57: \f5B110 3\fP 110 baud
58: \f5B134 4\fP 134.5 baud
59: \f5B150 5\fP 150 baud
60: \f5B200 6\fP 200 baud
61: \f5B300 7\fP 300 baud
62: \f5B600 8\fP 600 baud
63: \f5B1200 9\fP 1200 baud
64: \f5B1800 10\fP 1800 baud
65: \f5B2400 11\fP 2400 baud
66: \f5B4800 12\fP 4800 baud
67: \f5B9600 13\fP 9600 baud
68: \f5EXTA 14\fP External A
69: \f5EXTB 15\fP External B
70: .fi
71: .DT
72: .PP
73: The flags are:
74: .PP
75: .nf
76: \f5F8BIT 040\fP eight-bit input and output
77: \f5ODDP 0100\fP odd parity
78: \f5EVENP 0200\fP even parity
79: .fi
80: .PP
81: If
82: .L F8BIT
83: is set,
84: all eight bits of each output character
85: are transmitted
86: without imposing parity,
87: and all eight bits of each input character
88: are passed back without
89: parity checking or stripping.
90: Otherwise,
91: .L EVENP
92: requests that even parity be accepted and generated,
93: .L ODDP
94: odd parity.
95: If both
96: .L EVENP
97: and
98: .L ODDP
99: are set,
100: or if both are clear,
101: even parity is generated
102: and any parity is accepted.
103: .PP
104: For DZ11 lines,
105: 1200 baud
106: and 8-bit mode are the defaults.
107: The transmit and receive speeds are the same;
108: .B ospeed
109: is ignored.
110: .SH SEE ALSO
111: .IR ioctl (2),
112: .IR ttyld (4)
113: .SH BUGS
114: Every hardware interface doesn't support every operation.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.