OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems-20020807/] [doc/] [posix_users/] [device.t] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1026 ivang
@c
2
@c COPYRIGHT (c) 1988-2002.
3
@c On-Line Applications Research Corporation (OAR).
4
@c All rights reserved.
5
@c
6
@c device.t,v 1.5 2002/01/17 21:47:45 joel Exp
7
@c
8
 
9
@chapter Device- and Class- Specific Functions Manager
10
 
11
@section Introduction
12
 
13
The device- and class- specific functions manager is ...
14
 
15
The directives provided by the device- and class- specific functions
16
manager 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
 
35
There is currently no text in this section.
36
 
37
@section Operations
38
 
39
There is currently no text in this section.
40
 
41
@section Directives
42
 
43
This section details the device- and class- specific functions manager's
44
directives. A subsection is dedicated to each of this manager's directives
45
and describes the calling sequence, related constants, usage,
46
and 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 
62
 
63
int 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
 
74
The @code{cfgetispeed()} function returns a code for baud rate.
75
 
76
@subheading DESCRIPTION:
77
 
78
The @code{cfsetispeed()} function stores a code for the terminal speed
79
stored in a struct termios. The codes are defined in @code{}
80
by the macros BO, B50, B75, B110, B134, B150, B200, B300, B600, B1200,
81
B1800, B2400, B4800, B9600, B19200, and B38400.
82
 
83
The @code{cfsetispeed()} function does not do anything to the hardware.
84
It merely stores a value for use by @code{tcsetattr()}.
85
 
86
@subheading NOTES:
87
 
88
Baud rates are defined by symbols, such as B110, B1200, B2400. The actual
89
number 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 
105
 
106
int 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
 
117
The @code{cfgetospeed()} function returns the termios code for the baud rate.
118
 
119
@subheading DESCRIPTION:
120
 
121
The @code{cfgetospeed()} function returns a code for the terminal speed
122
stored in a @code{struct termios}. The codes are defined in @code{}
123
by the macros BO, B50, B75, B110, B134, B150, B200, B300, B600, B1200, B1800,
124
B2400, B4800, B9600, B19200, and B38400.
125
 
126
The @code{cfgetospeed()} function does not do anything to the hardware.
127
It merely returns the value stored by a previous call to @code{tcgetattr()}.
128
 
129
@subheading NOTES:
130
 
131
Baud rates are defined by symbols, such as B110, B1200, B2400. The actual
132
number 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 
148
 
149
int 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
 
161
The @code{cfsetispeed()} function returns a zero when successful and
162
returns -1 when an error occurs.
163
 
164
@subheading DESCRIPTION:
165
 
166
The @code{cfsetispeed()} function stores a code for the terminal speed
167
stored in a struct termios. The codes are defined in @code{}
168
by the macros B0, B50, B75, B110, B134, B150, B200, B300, B600, B1200,
169
B1800, B2400, B4800, B9600, B19200, and B38400.
170
 
171
@subheading NOTES:
172
 
173
This function merely stores a value in the @code{termios} structure. It
174
does not change the terminal speed until a @code{tcsetattr()} is done.
175
It 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 
191
 
192
int 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
 
204
The @code{cfsetospeed()} function returns a zero when successful and
205
returns -1 when an error occurs.
206
 
207
 
208
@subheading DESCRIPTION:
209
 
210
The @code{cfsetospeed()} function stores a code for the terminal speed stored
211
in a struct @code{termios}. The codes are defiined in @code{} by the
212
macros B0, B50, B75, B110, B134, B150, B200, B300, B600, B1200, B1800, B2400,
213
B4800, B9600, B19200, and B38400.
214
 
215
The @code{cfsetospeed()} function does not do anything to the hardware. It
216
merely stores a value for use by @code{tcsetattr()}.
217
 
218
@subheading NOTES:
219
 
220
This function merely stores a value in the @code{termios} structure.
221
It does not change the terminal speed until a @code{tcsetattr()} is done.
222
It 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 
238
#include 
239
 
240
int 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
254
Invalid file descriptor
255
 
256
@item ENOOTY
257
Terminal control function attempted for a file that is not a terminal.
258
@end table
259
 
260
@subheading DESCRIPTION:
261
 
262
The @code{tcgetattr()} gets the parameters associated with the terminal
263
referred to by @code{fildes} and stores them into the @code{termios()}
264
structure pointed to by @code{termios_p}.
265
 
266
@subheading NOTES:
267
 
268
NONE
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 
284
#include 
285
 
286
int 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
301
The
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
322
int 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
335
The
336
 
337
@end table
338
 
339
@subheading DESCRIPTION:
340
 
341
@subheading NOTES:
342
 
343
This routine is not currently supported by RTEMS but could be
344
in 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 
360
#include 
361
 
362
int 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
375
Invalid file descriptor
376
 
377
@item EINTR
378
Function was interrupted by a signal
379
 
380
@item ENOTTY
381
Terminal control function attempted for a file that is not a terminal.
382
 
383
@end table
384
 
385
@subheading DESCRIPTION:
386
 
387
The @code{tcdrain()} function waits until all output written to
388
@code{fildes} has been transmitted.
389
 
390
@subheading NOTES:
391
 
392
NONE
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
407
int 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
420
The
421
 
422
@end table
423
 
424
@subheading DESCRIPTION:
425
 
426
@subheading NOTES:
427
 
428
This routine is not currently supported by RTEMS but could be
429
in 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
444
int 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
457
The
458
 
459
@end table
460
 
461
@subheading DESCRIPTION:
462
 
463
@subheading NOTES:
464
 
465
This routine is not currently supported by RTEMS but could be
466
in 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
481
int 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
493
The
494
 
495
@end table
496
 
497
@subheading DESCRIPTION:
498
 
499
@subheading NOTES:
500
 
501
This routine is not currently supported by RTEMS but could be
502
in 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
517
int 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
529
The
530
 
531
@end table
532
 
533
@subheading DESCRIPTION:
534
 
535
@subheading NOTES:
536
 
537
This routine is not currently supported by RTEMS but could be
538
in a future version.
539
 
540
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.