Changeset 6e62b72e in rtems


Ignore:
Timestamp:
Sep 29, 1998, 9:52:24 PM (21 years ago)
Author:
Wade A Smith <warm38@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
982ed3f8
Parents:
80189ac2
Message:

Made cosmetic changes and documented routines in file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/new_chapters/device.t

    r80189ac2 r6e62b72e  
    1111@section Introduction
    1212
    13 The
    14 device- and class- specific functions manager is ...
    15 
    16 The directives provided by the device- and class- specific functions manager are:
     13The device- and class- specific functions manager is ...
     14
     15The directives provided by the device- and class- specific functions
     16manager are:
    1717
    1818@itemize @bullet
    19 @item @code{cfgetispeed} -
    20 @item @code{cfgetospeed} -
    21 @item @code{cfsetispeed} -
    22 @item @code{cfsetospeed} -
    23 @item @code{tcgetattr} -
    24 @item @code{tcsetattr} -
    25 @item @code{tcsendbreak} -
    26 @item @code{tcdrain} -
    27 @item @code{tcflush} -
    28 @item @code{tcflow} -
    29 @item @code{tcgetpgrp} -
    30 @item @code{tcsetpgrp} -
     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
    3131@end itemize
    3232
    3333@section Background
    3434
     35There is currently no text in this section.
     36
    3537@section Operations
    3638
     39There is currently no text in this section.
     40
    3741@section Directives
    3842
    39 This section details the device- and class- specific functions manager's directives.
    40 A subsection is dedicated to each of this manager's directives
     43This section details the device- and class- specific functions manager's
     44directives.  A subsection is dedicated to each of this manager's directives
    4145and describes the calling sequence, related constants, usage,
    4246and status codes.
    4347
    4448@page
    45 @subsection cfgetispeed -
    46 
    47 @subheading CALLING SEQUENCE:
    48 
    49 @ifset is-C
    50 @example
     49@subsection cfgetispeed - Reads terminal input baud rate
     50
     51@subheading CALLING SEQUENCE:
     52
     53@ifset is-C
     54@example
     55#include <termios.h>
     56
    5157int cfgetispeed(
    52 );
    53 @end example
    54 @end ifset
    55 
    56 @ifset is-Ada
    57 @end ifset
    58 
    59 @subheading STATUS CODES:
    60 
    61 @table @b
    62 @item E
    63 The
    64 
    65 @end table
    66 
    67 @subheading DESCRIPTION:
    68 
    69 @subheading NOTES:
    70 
    71 @page
    72 @subsection cfgetospeed -
    73 
    74 @subheading CALLING SEQUENCE:
    75 
    76 @ifset is-C
    77 @example
    78 int cfgetospeed(
    79 );
    80 @end example
    81 @end ifset
    82 
    83 @ifset is-Ada
    84 @end ifset
    85 
    86 @subheading STATUS CODES:
    87 
    88 @table @b
    89 @item E
    90 The
    91 
    92 @end table
    93 
    94 @subheading DESCRIPTION:
    95 
    96 @subheading NOTES:
    97 
    98 @page
    99 @subsection cfsetispeed -
    100 
    101 @subheading CALLING SEQUENCE:
    102 
    103 @ifset is-C
    104 @example
     58  const struct termios *p
     59);
     60@end example
     61@end ifset
     62
     63@ifset is-Ada
     64@end ifset
     65
     66@subheading STATUS CODES:
     67
     68The @code{cfgetispeed()} function returns a code for baud rate. 
     69
     70@subheading DESCRIPTION:
     71
     72The @code{cfsetispeed()} function stores a code for the terminal speed
     73stored in a struct termios.  The codes are defined in @code{<termios.h>}
     74by the macros BO, B50, B75, B110, B134, B150, B200, B300, B600, B1200,
     75B1800, B2400, B4800, B9600, B19200, and B38400.
     76
     77The @code{cfsetispeed()} function does not do anything to the hardware.
     78It merely stores a value for use by @code{tcsetattr()}.
     79
     80@subheading NOTES:
     81
     82Baud rates are defined by symbols, such as B110, B1200, B2400.  The actual
     83number returned for any given speed may change from system to system.
     84
     85@page
     86@subsection cfgetospeed - Reads terminal output baud rate
     87
     88@subheading CALLING SEQUENCE:
     89
     90@ifset is-C
     91@example
     92#include <termios.h>
     93
     94int cfgetospeed(
     95  const struct termios *p
     96);
     97@end example
     98@end ifset
     99
     100@ifset is-Ada
     101@end ifset
     102
     103@subheading STATUS CODES:
     104
     105The @code{cfgetospeed()} function returns the termios code for the baud rate.
     106
     107@subheading DESCRIPTION:
     108
     109The @code{cfgetospeed()} function returns a code for the terminal speed
     110stored in a @code{struct termios}.  The codes are defined in @code{<termios.h>}
     111by the macros BO, B50, B75, B110, B134, B150, B200, B300, B600, B1200, B1800,
     112B2400, B4800, B9600, B19200, and B38400.
     113
     114The @code{cfgetospeed()} function does not do anything to the hardware.
     115It merely returns the value stored by a previous call to @code{tcgetattr()}.
     116
     117@subheading NOTES:
     118
     119Baud reates are defined by symbols, such as B110, B1200, B2400.  The actual
     120number returned for any given speed may change from system to system.
     121
     122@page
     123@subsection cfsetispeed - Sets terminal input baud rate
     124
     125@subheading CALLING SEQUENCE:
     126
     127@ifset is-C
     128@example
     129#include <termios.h>
     130
    105131int cfsetispeed(
    106 );
    107 @end example
    108 @end ifset
    109 
    110 @ifset is-Ada
    111 @end ifset
    112 
    113 @subheading STATUS CODES:
    114 
    115 @table @b
    116 @item E
    117 The
    118 
    119 @end table
    120 
    121 @subheading DESCRIPTION:
    122 
    123 @subheading NOTES:
    124 
    125 @page
    126 @subsection cfsetospeed -
    127 
    128 @subheading CALLING SEQUENCE:
    129 
    130 @ifset is-C
    131 @example
     132  struct termios *p,
     133  speed_t         speed
     134);
     135@end example
     136@end ifset
     137
     138@ifset is-Ada
     139@end ifset
     140
     141@subheading STATUS CODES:
     142
     143The @code{cfsetispeed()} function returns a zero when successful and
     144returns -1 when an error occurs. 
     145
     146@subheading DESCRIPTION:
     147
     148The @code{cfsetispeed()} function stores a code for the terminal speed
     149stored in a struct termios.  The codes are defined in @code{<termios.h>}
     150by the macros B0, B50, B75, B110, B134, B150, B200, B300, B600, B1200,
     151B1800, B2400, B4800, B9600, B19200, and B38400.
     152
     153@subheading NOTES:
     154
     155This function merely stores a value in the @code{termios} structure.  It
     156does not change the terminal speed until a @code{tcsetattr()} is done.
     157It does not detect impossible terminal speeds.
     158
     159@page
     160@subsection cfsetospeed - Sets terminal output baud rate
     161
     162@subheading CALLING SEQUENCE:
     163
     164@ifset is-C
     165@example
     166#include <termios.h>
     167
    132168int cfsetospeed(
    133 );
    134 @end example
    135 @end ifset
    136 
    137 @ifset is-Ada
    138 @end ifset
    139 
    140 @subheading STATUS CODES:
    141 
    142 @table @b
    143 @item E
    144 The
    145 
    146 @end table
    147 
    148 @subheading DESCRIPTION:
    149 
    150 @subheading NOTES:
    151 
    152 @page
    153 @subsection tcgetattr -
    154 
    155 @subheading CALLING SEQUENCE:
    156 
    157 @ifset is-C
    158 @example
     169  struct termios *p,
     170  speed_t         speed
     171);
     172@end example
     173@end ifset
     174
     175@ifset is-Ada
     176@end ifset
     177
     178@subheading STATUS CODES:
     179
     180The @code{cfsetospeed()} function returns a zero when successful and
     181returns -1 when an error occurs. 
     182
     183
     184@subheading DESCRIPTION:
     185
     186The @code{cfsetospeed()} function stores a code for the terminal speed stored
     187in a struct @code{termios}.  The codes are defiined in @code{<termios.h>} by the
     188macros B0, B50, B75, B110, B134, B150, B200, B300, B600, B1200, B1800, B2400,
     189B4800, B9600, B19200, and B38400.
     190
     191The @code{cfsetospeed()} function does not do anything to the hardware.  It
     192merely stores a value for use by @code{tcsetattr()}.
     193
     194@subheading NOTES:
     195
     196This function merely stores a value in the @code{termios} structure.
     197It does not change the terminal speed until a @code{tcsetattr()} is done.
     198It does not detect impossible terminal speeds.
     199
     200@page
     201@subsection tcgetattr - Gets terminal attributes
     202
     203@subheading CALLING SEQUENCE:
     204
     205@ifset is-C
     206@example
     207#include <termios.h>
     208#include <unistd.h>
     209
    159210int tcgetattr(
    160 );
    161 @end example
    162 @end ifset
    163 
    164 @ifset is-Ada
    165 @end ifset
    166 
    167 @subheading STATUS CODES:
    168 
    169 @table @b
    170 @item E
    171 The
    172 
    173 @end table
    174 
    175 @subheading DESCRIPTION:
    176 
    177 @subheading NOTES:
    178 
    179 @page
    180 @subsection tcsetattr -
    181 
    182 @subheading CALLING SEQUENCE:
    183 
    184 @ifset is-C
    185 @example
     211  int fildes,
     212  struct termios *p
     213);
     214@end example
     215@end ifset
     216
     217@ifset is-Ada
     218@end ifset
     219
     220@subheading STATUS CODES:
     221
     222@table @b
     223@item EBADF
     224Invalid file descriptor
     225
     226@item ENOOTY
     227Terminal control function attempted for a file that is not a terminal.
     228@end table
     229
     230@subheading DESCRIPTION:
     231
     232The @code{tcgetattr()} gets the parameters associated with the terminal
     233referred to by @code{fildes} and stores them into the @code{termios()}
     234structure pointed to by @code{termios_p}.
     235
     236@subheading NOTES:
     237
     238NONE
     239
     240@page
     241@subsection tcsetattr - Set terminal attributes
     242
     243@subheading CALLING SEQUENCE:
     244
     245@ifset is-C
     246@example
     247#include <termios.h>
     248#include <unistd.h>
     249
    186250int tcsetattr(
    187 );
    188 @end example
    189 @end ifset
    190 
    191 @ifset is-Ada
    192 @end ifset
    193 
    194 @subheading STATUS CODES:
    195 
    196 @table @b
    197 @item E
    198 The
    199 
    200 @end table
    201 
    202 @subheading DESCRIPTION:
    203 
    204 @subheading NOTES:
    205 
    206 @page
    207 @subsection tcsendbreak -
     251  int                   fildes,
     252  int                   options,
     253  const struct termios *tp
     254);
     255@end example
     256@end ifset
     257
     258@ifset is-Ada
     259@end ifset
     260
     261@subheading STATUS CODES:
     262
     263@table @b
     264@item E
     265The
     266
     267@end table
     268
     269@subheading DESCRIPTION:
     270
     271@subheading NOTES:
     272
     273@page
     274@subsection tcsendbreak - Sends a break to a terminal
    208275
    209276@subheading CALLING SEQUENCE:
     
    231298@subheading NOTES:
    232299
    233 @page
    234 @subsection tcdrain -
    235 
    236 @subheading CALLING SEQUENCE:
    237 
    238 @ifset is-C
    239 @example
     300This routine is not currently supported by RTEMS but could be
     301in a future version.
     302
     303@page
     304@subsection tcdrain - Waits for all output to be transmitted to the terminal.
     305
     306@subheading CALLING SEQUENCE:
     307
     308@ifset is-C
     309@example
     310#include <termios.h>
     311#include <unistd.h>
     312
    240313int tcdrain(
    241 );
    242 @end example
    243 @end ifset
    244 
    245 @ifset is-Ada
    246 @end ifset
    247 
    248 @subheading STATUS CODES:
    249 
    250 @table @b
    251 @item E
    252 The
    253 
    254 @end table
    255 
    256 @subheading DESCRIPTION:
    257 
    258 @subheading NOTES:
    259 
    260 @page
    261 @subsection tcflush -
     314  int fildes
     315);
     316@end example
     317@end ifset
     318
     319@ifset is-Ada
     320@end ifset
     321
     322@subheading STATUS CODES:
     323
     324@table @b
     325@item EBADF
     326Invalid file descriptor
     327
     328@item EINTR
     329Function was interrupted by a signal
     330
     331@item ENOTTY
     332Terminal control function attempted for a file that is not a terminal.
     333
     334@end table
     335
     336@subheading DESCRIPTION:
     337
     338The @code{tcdrain()} function waits until all output written to
     339@code{fildes} has been transmitted.
     340
     341@subheading NOTES:
     342
     343NONE
     344
     345@page
     346@subsection tcflush - Discards terminal data
    262347
    263348@subheading CALLING SEQUENCE:
     
    285370@subheading NOTES:
    286371
    287 @page
    288 @subsection tcflow -
     372This routine is not currently supported by RTEMS but could be
     373in a future version.
     374
     375@page
     376@subsection tcflow - Suspends/restarts terminal output.
    289377
    290378@subheading CALLING SEQUENCE:
     
    312400@subheading NOTES:
    313401
    314 @page
    315 @subsection tcgetpgrp -
     402This routine is not currently supported by RTEMS but could be
     403in a future version.
     404
     405@page
     406@subsection tcgetpgrp - Gets foreground process group ID
    316407
    317408@subheading CALLING SEQUENCE:
     
    339430@subheading NOTES:
    340431
    341 @page
    342 @subsection tcsetpgrp -
     432This routine is not currently supported by RTEMS but could be
     433in a future version.
     434
     435@page
     436@subsection tcsetpgrp - Sets foreground process group ID
    343437
    344438@subheading CALLING SEQUENCE:
     
    366460@subheading NOTES:
    367461
     462This routine is not currently supported by RTEMS but could be
     463in a future version.
     464
     465
Note: See TracChangeset for help on using the changeset viewer.