source: rtems/doc/posix_users/device.t @ 0660b4f8

4.104.114.84.95
Last change on this file since 0660b4f8 was 0660b4f8, checked in by Joel Sherrill <joel.sherrill@…>, on 11/16/99 at 19:50:56

Changed copyright date to 1999.

  • Property mode set to 100644
File size: 9.3 KB
Line 
1@c
2@c COPYRIGHT (c) 1988-1999.
3@c On-Line Applications Research Corporation (OAR).
4@c All rights reserved.
5@c
6@c $Id$
7@c
8
9@chapter Device- and Class- Specific Functions Manager
10
11@section Introduction
12
13The device- and class- specific functions manager is ...
14
15The directives provided by the device- and class- specific functions
16manager are:
17
18@itemize @bullet
19@item @code{cfgetispeed} - Reads terminal input baud rate
20@item @code{cfgetospeed} - Reads terminal output baud rate
21@item @code{cfsetispeed} - Sets terminal input baud rate
22@item @code{cfsetospeed} - Set terminal output baud rate
23@item @code{tcgetattr} - Gets terminal attributes
24@item @code{tcsetattr} - Set terminal attributes
25@item @code{tcsendbreak} - Sends a break to a terminal
26@item @code{tcdrain} - Waits for all output to be transmitted to the terminal
27@item @code{tcflush} - Discards terminal data
28@item @code{tcflow} - Suspends/restarts terminal output
29@item @code{tcgetpgrp} - Gets foreground process group ID
30@item @code{tcsetpgrp} - Sets foreground process group ID
31@end itemize
32
33@section Background
34
35There is currently no text in this section.
36
37@section Operations
38
39There is currently no text in this section.
40
41@section Directives
42
43This section details the device- and class- specific functions manager's
44directives. A subsection is dedicated to each of this manager's directives
45and describes the calling sequence, related constants, usage,
46and status codes.
47
48@c
49@c
50@c
51@page
52@subsection cfgetispeed - Reads terminal input baud rate
53
54@findex cfgetispeed
55@cindex  reads terminal input baud rate
56
57@subheading CALLING SEQUENCE:
58
59@ifset is-C
60@example
61#include <termios.h>
62
63int cfgetispeed(
64const struct termios *p
65);
66@end example
67@end ifset
68
69@ifset is-Ada
70@end ifset
71
72@subheading STATUS CODES:
73
74The @code{cfgetispeed()} function returns a code for baud rate.
75
76@subheading DESCRIPTION:
77
78The @code{cfsetispeed()} function stores a code for the terminal speed
79stored in a struct termios. The codes are defined in @code{<termios.h>}
80by the macros BO, B50, B75, B110, B134, B150, B200, B300, B600, B1200,
81B1800, B2400, B4800, B9600, B19200, and B38400.
82
83The @code{cfsetispeed()} function does not do anything to the hardware.
84It merely stores a value for use by @code{tcsetattr()}.
85
86@subheading NOTES:
87
88Baud rates are defined by symbols, such as B110, B1200, B2400. The actual
89number returned for any given speed may change from system to system.
90
91@c
92@c
93@c
94@page
95@subsection cfgetospeed - Reads terminal output baud rate
96
97@findex cfgetospeed
98@cindex  reads terminal output baud rate
99
100@subheading CALLING SEQUENCE:
101
102@ifset is-C
103@example
104#include <termios.h>
105
106int cfgetospeed(
107const struct termios *p
108);
109@end example
110@end ifset
111
112@ifset is-Ada
113@end ifset
114
115@subheading STATUS CODES:
116
117The @code{cfgetospeed()} function returns the termios code for the baud rate.
118
119@subheading DESCRIPTION:
120
121The @code{cfgetospeed()} function returns a code for the terminal speed
122stored in a @code{struct termios}. The codes are defined in @code{<termios.h>}
123by the macros BO, B50, B75, B110, B134, B150, B200, B300, B600, B1200, B1800,
124B2400, B4800, B9600, B19200, and B38400.
125
126The @code{cfgetospeed()} function does not do anything to the hardware.
127It merely returns the value stored by a previous call to @code{tcgetattr()}.
128
129@subheading NOTES:
130
131Baud rates are defined by symbols, such as B110, B1200, B2400. The actual
132number returned for any given speed may change from system to system.
133
134@c
135@c
136@c
137@page
138@subsection cfsetispeed - Sets terminal input baud rate
139
140@findex cfsetispeed
141@cindex  sets terminal input baud rate
142
143@subheading CALLING SEQUENCE:
144
145@ifset is-C
146@example
147#include <termios.h>
148
149int cfsetispeed(
150struct termios *p,
151speed_t speed
152);
153@end example
154@end ifset
155
156@ifset is-Ada
157@end ifset
158
159@subheading STATUS CODES:
160
161The @code{cfsetispeed()} function returns a zero when successful and
162returns -1 when an error occurs.
163
164@subheading DESCRIPTION:
165
166The @code{cfsetispeed()} function stores a code for the terminal speed
167stored in a struct termios. The codes are defined in @code{<termios.h>}
168by the macros B0, B50, B75, B110, B134, B150, B200, B300, B600, B1200,
169B1800, B2400, B4800, B9600, B19200, and B38400.
170
171@subheading NOTES:
172
173This function merely stores a value in the @code{termios} structure. It
174does not change the terminal speed until a @code{tcsetattr()} is done.
175It does not detect impossible terminal speeds.
176
177@c
178@c
179@c
180@page
181@subsection cfsetospeed - Sets terminal output baud rate
182
183@findex cfsetospeed
184@cindex  sets terminal output baud rate
185
186@subheading CALLING SEQUENCE:
187
188@ifset is-C
189@example
190#include <termios.h>
191
192int cfsetospeed(
193struct termios *p,
194speed_t speed
195);
196@end example
197@end ifset
198
199@ifset is-Ada
200@end ifset
201
202@subheading STATUS CODES:
203
204The @code{cfsetospeed()} function returns a zero when successful and
205returns -1 when an error occurs.
206
207
208@subheading DESCRIPTION:
209
210The @code{cfsetospeed()} function stores a code for the terminal speed stored
211in a struct @code{termios}. The codes are defiined in @code{<termios.h>} by the
212macros B0, B50, B75, B110, B134, B150, B200, B300, B600, B1200, B1800, B2400,
213B4800, B9600, B19200, and B38400.
214
215The @code{cfsetospeed()} function does not do anything to the hardware. It
216merely stores a value for use by @code{tcsetattr()}.
217
218@subheading NOTES:
219
220This function merely stores a value in the @code{termios} structure.
221It does not change the terminal speed until a @code{tcsetattr()} is done.
222It does not detect impossible terminal speeds.
223
224@c
225@c
226@c
227@page
228@subsection tcgetattr - Gets terminal attributes
229
230@findex tcgetattr
231@cindex  gets terminal attributes
232
233@subheading CALLING SEQUENCE:
234
235@ifset is-C
236@example
237#include <termios.h>
238#include <unistd.h>
239
240int tcgetattr(
241int fildes,
242struct termios *p
243);
244@end example
245@end ifset
246
247@ifset is-Ada
248@end ifset
249
250@subheading STATUS CODES:
251
252@table @b
253@item EBADF
254Invalid file descriptor
255
256@item ENOOTY
257Terminal control function attempted for a file that is not a terminal.
258@end table
259
260@subheading DESCRIPTION:
261
262The @code{tcgetattr()} gets the parameters associated with the terminal
263referred to by @code{fildes} and stores them into the @code{termios()}
264structure pointed to by @code{termios_p}.
265
266@subheading NOTES:
267
268NONE
269
270@c
271@c
272@c
273@page
274@subsection tcsetattr - Set terminal attributes
275
276@findex tcsetattr
277@cindex  set terminal attributes
278
279@subheading CALLING SEQUENCE:
280
281@ifset is-C
282@example
283#include <termios.h>
284#include <unistd.h>
285
286int tcsetattr(
287int fildes,
288int options,
289const struct termios *tp
290);
291@end example
292@end ifset
293
294@ifset is-Ada
295@end ifset
296
297@subheading STATUS CODES:
298
299@table @b
300@item E
301The
302
303@end table
304
305@subheading DESCRIPTION:
306
307@subheading NOTES:
308
309@c
310@c
311@c
312@page
313@subsection tcsendbreak - Sends a break to a terminal
314
315@findex tcsendbreak
316@cindex  sends a break to a terminal
317
318@subheading CALLING SEQUENCE:
319
320@ifset is-C
321@example
322int tcsendbreak(
323);
324@end example
325@end ifset
326
327@ifset is-Ada
328@end ifset
329
330@subheading STATUS CODES:
331
332@table @b
333@item E
334The
335
336@end table
337
338@subheading DESCRIPTION:
339
340@subheading NOTES:
341
342This routine is not currently supported by RTEMS but could be
343in a future version.
344
345@c
346@c
347@c
348@page
349@subsection tcdrain - Waits for all output to be transmitted to the terminal.
350
351@findex tcdrain
352@cindex  waits for all output to be transmitted to the terminal.
353
354@subheading CALLING SEQUENCE:
355
356@ifset is-C
357@example
358#include <termios.h>
359#include <unistd.h>
360
361int tcdrain(
362int fildes
363);
364@end example
365@end ifset
366
367@ifset is-Ada
368@end ifset
369
370@subheading STATUS CODES:
371
372@table @b
373@item EBADF
374Invalid file descriptor
375
376@item EINTR
377Function was interrupted by a signal
378
379@item ENOTTY
380Terminal control function attempted for a file that is not a terminal.
381
382@end table
383
384@subheading DESCRIPTION:
385
386The @code{tcdrain()} function waits until all output written to
387@code{fildes} has been transmitted.
388
389@subheading NOTES:
390
391NONE
392
393@c
394@c
395@c
396@page
397@subsection tcflush - Discards terminal data
398
399@findex tcflush
400@cindex  discards terminal data
401
402@subheading CALLING SEQUENCE:
403
404@ifset is-C
405@example
406int tcflush(
407);
408@end example
409@end ifset
410
411@ifset is-Ada
412@end ifset
413
414@subheading STATUS CODES:
415
416@table @b
417@item E
418The
419
420@end table
421
422@subheading DESCRIPTION:
423
424@subheading NOTES:
425
426This routine is not currently supported by RTEMS but could be
427in a future version.
428
429@c
430@c
431@c
432@page
433@subsection tcflow - Suspends/restarts terminal output.
434
435@findex tcflow
436@cindex  suspends/restarts terminal output.
437
438@subheading CALLING SEQUENCE:
439
440@ifset is-C
441@example
442int tcflow(
443);
444@end example
445@end ifset
446
447@ifset is-Ada
448@end ifset
449
450@subheading STATUS CODES:
451
452@table @b
453@item E
454The
455
456@end table
457
458@subheading DESCRIPTION:
459
460@subheading NOTES:
461
462This routine is not currently supported by RTEMS but could be
463in a future version.
464
465@c
466@c
467@c
468@page
469@subsection tcgetpgrp - Gets foreground process group ID
470
471@findex tcgetpgrp
472@cindex  gets foreground process group id
473
474@subheading CALLING SEQUENCE:
475
476@ifset is-C
477@example
478int tcgetpgrp(
479);
480@end example
481@end ifset
482
483@ifset is-Ada
484@end ifset
485
486@subheading STATUS CODES:
487
488@table @b
489@item E
490The
491
492@end table
493
494@subheading DESCRIPTION:
495
496@subheading NOTES:
497
498This routine is not currently supported by RTEMS but could be
499in a future version.
500
501@c
502@c
503@c
504@page
505@subsection tcsetpgrp - Sets foreground process group ID
506
507@findex tcsetpgrp
508@cindex  sets foreground process group id
509
510@subheading CALLING SEQUENCE:
511
512@ifset is-C
513@example
514int tcsetpgrp(
515);
516@end example
517@end ifset
518
519@ifset is-Ada
520@end ifset
521
522@subheading STATUS CODES:
523
524@table @b
525@item E
526The
527
528@end table
529
530@subheading DESCRIPTION:
531
532@subheading NOTES:
533
534This routine is not currently supported by RTEMS but could be
535in a future version.
536
537
Note: See TracBrowser for help on using the repository browser.