source: rtems/doc/posix_users/device.t @ e630235

4.115
Last change on this file since e630235 was 6449498, checked in by Joel Sherrill <joel.sherrill@…>, on 01/17/02 at 21:47:47

2001-01-17 Joel Sherrill <joel@…>

  • SUPPORT, LICENSE: New files.
  • Numerous files touched as part of merging the 4.5 branch onto the mainline development trunk and ensuring that the script that cuts snapshots and releases works on the documentation.
  • Property mode set to 100644
File size: 9.4 KB
Line 
1@c
2@c COPYRIGHT (c) 1988-2002.
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(
64  const 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(
107  const 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(
150  struct termios *p,
151  speed_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(
193  struct termios *p,
194  speed_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(
241  int             fildes,
242  struct 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(
287  int                   fildes,
288  int                   options,
289  const 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  int fd
324);
325@end example
326@end ifset
327
328@ifset is-Ada
329@end ifset
330
331@subheading STATUS CODES:
332
333@table @b
334@item E
335The
336
337@end table
338
339@subheading DESCRIPTION:
340
341@subheading NOTES:
342
343This routine is not currently supported by RTEMS but could be
344in a future version.
345
346@c
347@c
348@c
349@page
350@subsection tcdrain - Waits for all output to be transmitted to the terminal.
351
352@findex tcdrain
353@cindex  waits for all output to be transmitted to the terminal.
354
355@subheading CALLING SEQUENCE:
356
357@ifset is-C
358@example
359#include <termios.h>
360#include <unistd.h>
361
362int tcdrain(
363  int fildes
364);
365@end example
366@end ifset
367
368@ifset is-Ada
369@end ifset
370
371@subheading STATUS CODES:
372
373@table @b
374@item EBADF
375Invalid file descriptor
376
377@item EINTR
378Function was interrupted by a signal
379
380@item ENOTTY
381Terminal control function attempted for a file that is not a terminal.
382
383@end table
384
385@subheading DESCRIPTION:
386
387The @code{tcdrain()} function waits until all output written to
388@code{fildes} has been transmitted.
389
390@subheading NOTES:
391
392NONE
393
394@c
395@c
396@c
397@page
398@subsection tcflush - Discards terminal data
399
400@findex tcflush
401@cindex  discards terminal data
402
403@subheading CALLING SEQUENCE:
404
405@ifset is-C
406@example
407int tcflush(
408  int fd
409);
410@end example
411@end ifset
412
413@ifset is-Ada
414@end ifset
415
416@subheading STATUS CODES:
417
418@table @b
419@item E
420The
421
422@end table
423
424@subheading DESCRIPTION:
425
426@subheading NOTES:
427
428This routine is not currently supported by RTEMS but could be
429in a future version.
430
431@c
432@c
433@c
434@page
435@subsection tcflow - Suspends/restarts terminal output.
436
437@findex tcflow
438@cindex  suspends/restarts terminal output.
439
440@subheading CALLING SEQUENCE:
441
442@ifset is-C
443@example
444int tcflow(
445  int fd
446);
447@end example
448@end ifset
449
450@ifset is-Ada
451@end ifset
452
453@subheading STATUS CODES:
454
455@table @b
456@item E
457The
458
459@end table
460
461@subheading DESCRIPTION:
462
463@subheading NOTES:
464
465This routine is not currently supported by RTEMS but could be
466in a future version.
467
468@c
469@c
470@c
471@page
472@subsection tcgetpgrp - Gets foreground process group ID
473
474@findex tcgetpgrp
475@cindex  gets foreground process group id
476
477@subheading CALLING SEQUENCE:
478
479@ifset is-C
480@example
481int tcgetpgrp(
482);
483@end example
484@end ifset
485
486@ifset is-Ada
487@end ifset
488
489@subheading STATUS CODES:
490
491@table @b
492@item E
493The
494
495@end table
496
497@subheading DESCRIPTION:
498
499@subheading NOTES:
500
501This routine is not currently supported by RTEMS but could be
502in a future version.
503
504@c
505@c
506@c
507@page
508@subsection tcsetpgrp - Sets foreground process group ID
509
510@findex tcsetpgrp
511@cindex  sets foreground process group id
512
513@subheading CALLING SEQUENCE:
514
515@ifset is-C
516@example
517int tcsetpgrp(
518);
519@end example
520@end ifset
521
522@ifset is-Ada
523@end ifset
524
525@subheading STATUS CODES:
526
527@table @b
528@item E
529The
530
531@end table
532
533@subheading DESCRIPTION:
534
535@subheading NOTES:
536
537This routine is not currently supported by RTEMS but could be
538in a future version.
539
540
Note: See TracBrowser for help on using the repository browser.