summaryrefslogtreecommitdiffstats
path: root/posix_users/device_and_class_specific.rst
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2016-02-26 18:22:07 +1100
committerAmar Takhar <verm@darkbeer.org>2016-05-02 20:51:26 -0400
commitfa70fd20878e402610c263f129266593d31a0376 (patch)
treec609d33c7047b975cfe8e0ac0df020fb26dae255 /posix_users/device_and_class_specific.rst
parentUpdate the shell user's guide top level. (diff)
downloadrtems-docs-fa70fd20878e402610c263f129266593d31a0376.tar.bz2
POSIX User clean up.
Diffstat (limited to '')
-rw-r--r--posix_users/device_and_class_specific.rst283
1 files changed, 165 insertions, 118 deletions
diff --git a/posix_users/device_and_class_specific.rst b/posix_users/device_and_class_specific.rst
index 0c344d2..e74b692 100644
--- a/posix_users/device_and_class_specific.rst
+++ b/posix_users/device_and_class_specific.rst
@@ -1,3 +1,7 @@
+.. COMMENT: COPYRIGHT (c) 1988-2002.
+.. COMMENT: On-Line Applications Research Corporation (OAR).
+.. COMMENT: All rights reserved.
+
Device- and Class- Specific Functions Manager
#############################################
@@ -6,32 +10,32 @@ Introduction
The device- and class- specific functions manager is ...
-The directives provided by the device- and class- specific functions
-manager are:
+The directives provided by the device- and class- specific functions manager
+are:
-- ``cfgetispeed`` - Reads terminal input baud rate
+- cfgetispeed_ - Reads terminal input baud rate
-- ``cfgetospeed`` - Reads terminal output baud rate
+- cfgetospeed_ - Reads terminal output baud rate
-- ``cfsetispeed`` - Sets terminal input baud rate
+- cfsetispeed_ - Sets terminal input baud rate
-- ``cfsetospeed`` - Set terminal output baud rate
+- cfsetospeed_ - Set terminal output baud rate
-- ``tcgetattr`` - Gets terminal attributes
+- tcgetattr_ - Gets terminal attributes
-- ``tcsetattr`` - Set terminal attributes
+- tcsetattr_ - Set terminal attributes
-- ``tcsendbreak`` - Sends a break to a terminal
+- tcsendbreak_ - Sends a break to a terminal
-- ``tcdrain`` - Waits for all output to be transmitted to the terminal
+- tcdrain_ - Waits for all output to be transmitted to the terminal
-- ``tcflush`` - Discards terminal data
+- tcflush_ - Discards terminal data
-- ``tcflow`` - Suspends/restarts terminal output
+- tcflow_ - Suspends/restarts terminal output
-- ``tcgetpgrp`` - Gets foreground process group ID
+- tcgetpgrp_ - Gets foreground process group ID
-- ``tcsetpgrp`` - Sets foreground process group ID
+- tcsetpgrp_ - Sets foreground process group ID
Background
==========
@@ -51,6 +55,8 @@ directives. A subsection is dedicated to each of this manager's directives
and describes the calling sequence, related constants, usage,
and status codes.
+.. _cfgetispeed:
+
cfgetispeed - Reads terminal input baud rate
--------------------------------------------
.. index:: cfgetispeed
@@ -58,11 +64,11 @@ cfgetispeed - Reads terminal input baud rate
**CALLING SEQUENCE:**
-.. code:: c
+.. code-block:: c
#include <termios.h>
int cfgetispeed(
- const struct termios \*p
+ const struct termios *p
);
**STATUS CODES:**
@@ -71,18 +77,21 @@ The ``cfgetispeed()`` function returns a code for baud rate.
**DESCRIPTION:**
-The ``cfsetispeed()`` function stores a code for the terminal speed
-stored in a struct termios. The codes are defined in ``<termios.h>``
-by the macros BO, B50, B75, B110, B134, B150, B200, B300, B600, B1200,
-B1800, B2400, B4800, B9600, B19200, and B38400.
+The ``cfsetispeed()`` function stores a code for the terminal speed stored in a
+struct termios. The codes are defined in ``<termios.h>`` by the macros ``BO``,
+``B50``, ``B75``, ``B110``, ``B134``, ``B150``, ``B200``, ``B300``, ``B600``,
+``B1200``, ``B1800``, ``B2400``, ``B4800``, ``B9600``, ``B19200``, and
+``B38400``.
-The ``cfsetispeed()`` function does not do anything to the hardware.
-It merely stores a value for use by ``tcsetattr()``.
+The ``cfsetispeed()`` function does not do anything to the hardware. It merely
+stores a value for use by ``tcsetattr()``.
**NOTES:**
-Baud rates are defined by symbols, such as B110, B1200, B2400. The actual
-number returned for any given speed may change from system to system.
+Baud rates are defined by symbols, such as ``B110``, ``B1200``, ``B2400``. The
+actual number returned for any given speed may change from system to system.
+
+.. _cfgetospeed:
cfgetospeed - Reads terminal output baud rate
---------------------------------------------
@@ -91,11 +100,11 @@ cfgetospeed - Reads terminal output baud rate
**CALLING SEQUENCE:**
-.. code:: c
+.. code-block:: c
#include <termios.h>
- int cfgetospeed(
- const struct termios \*p
+ int cfgetospeed(
+ const struct termios *p
);
**STATUS CODES:**
@@ -104,18 +113,21 @@ The ``cfgetospeed()`` function returns the termios code for the baud rate.
**DESCRIPTION:**
-The ``cfgetospeed()`` function returns a code for the terminal speed
-stored in a ``struct termios``. The codes are defined in ``<termios.h>``
-by the macros BO, B50, B75, B110, B134, B150, B200, B300, B600, B1200, B1800,
-B2400, B4800, B9600, B19200, and B38400.
+The ``cfgetospeed()`` function returns a code for the terminal speed stored in
+a ``struct termios``. The codes are defined in ``<termios.h>`` by the macros
+``BO``, ``B50``, ``B75``, ``B110``, ``B134``, ``B150``, ``B200``, ``B300``,
+``B600``, ``B1200``, ``B1800``, ``B2400``, ``B4800``, ``B9600``, ``B19200``,
+and ``B38400``.
-The ``cfgetospeed()`` function does not do anything to the hardware.
-It merely returns the value stored by a previous call to ``tcgetattr()``.
+The ``cfgetospeed()`` function does not do anything to the hardware. It merely
+returns the value stored by a previous call to ``tcgetattr()``.
**NOTES:**
-Baud rates are defined by symbols, such as B110, B1200, B2400. The actual
-number returned for any given speed may change from system to system.
+Baud rates are defined by symbols, such as ``B110``, ``B1200``, ``B2400``. The
+actual number returned for any given speed may change from system to system.
+
+.. _cfsetispeed:
cfsetispeed - Sets terminal input baud rate
-------------------------------------------
@@ -124,31 +136,34 @@ cfsetispeed - Sets terminal input baud rate
**CALLING SEQUENCE:**
-.. code:: c
+.. code-block:: c
#include <termios.h>
int cfsetispeed(
- struct termios \*p,
- speed_t speed
+ struct termios *p,
+ speed_t speed
);
**STATUS CODES:**
-The ``cfsetispeed()`` function returns a zero when successful and
-returns -1 when an error occurs.
+The ``cfsetispeed()`` function returns a zero when successful and returns -1
+when an error occurs.
**DESCRIPTION:**
-The ``cfsetispeed()`` function stores a code for the terminal speed
-stored in a struct termios. The codes are defined in ``<termios.h>``
-by the macros B0, B50, B75, B110, B134, B150, B200, B300, B600, B1200,
-B1800, B2400, B4800, B9600, B19200, and B38400.
+The ``cfsetispeed()`` function stores a code for the terminal speed stored in a
+struct termios. The codes are defined in ``<termios.h>`` by the macros ``BO``,
+``B50``, ``B75``, ``B110``, ``B134``, ``B150``, ``B200``, ``B300``, ``B600``,
+``B1200``, ``B1800``, ``B2400``, ``B4800``, ``B9600``, ``B19200``, and
+``B38400``.
**NOTES:**
-This function merely stores a value in the ``termios`` structure. It
-does not change the terminal speed until a ``tcsetattr()`` is done.
-It does not detect impossible terminal speeds.
+This function merely stores a value in the ``termios`` structure. It does not
+change the terminal speed until a ``tcsetattr()`` is done. It does not detect
+impossible terminal speeds.
+
+.. _cfsetospeed:
cfsetospeed - Sets terminal output baud rate
--------------------------------------------
@@ -157,12 +172,12 @@ cfsetospeed - Sets terminal output baud rate
**CALLING SEQUENCE:**
-.. code:: c
+.. code-block:: c
#include <termios.h>
int cfsetospeed(
- struct termios \*p,
- speed_t speed
+ struct termios *p,
+ speed_t speed
);
**STATUS CODES:**
@@ -172,19 +187,22 @@ returns -1 when an error occurs.
**DESCRIPTION:**
-The ``cfsetospeed()`` function stores a code for the terminal speed stored
-in a struct ``termios``. The codes are defiined in ``<termios.h>`` by the
-macros B0, B50, B75, B110, B134, B150, B200, B300, B600, B1200, B1800, B2400,
-B4800, B9600, B19200, and B38400.
+The ``cfsetospeed()`` function stores a code for the terminal speed stored in a
+struct ``termios``. The codes are defiined in ``<termios.h>`` by the macros
+``BO``, ``B50``, ``B75``, ``B110``, ``B134``, ``B150``, ``B200``, ``B300``,
+``B600``, ``B1200``, ``B1800``, ``B2400``, ``B4800``, ``B9600``, ``B19200``,
+and ``B38400``.
-The ``cfsetospeed()`` function does not do anything to the hardware. It
-merely stores a value for use by ``tcsetattr()``.
+The ``cfsetospeed()`` function does not do anything to the hardware. It merely
+stores a value for use by ``tcsetattr()``.
**NOTES:**
-This function merely stores a value in the ``termios`` structure.
-It does not change the terminal speed until a ``tcsetattr()`` is done.
-It does not detect impossible terminal speeds.
+This function merely stores a value in the ``termios`` structure. It does not
+change the terminal speed until a ``tcsetattr()`` is done. It does not detect
+impossible terminal speeds.
+
+.. _tcgetattr:
tcgetattr - Gets terminal attributes
------------------------------------
@@ -193,33 +211,37 @@ tcgetattr - Gets terminal attributes
**CALLING SEQUENCE:**
-.. code:: c
+.. code-block:: c
#include <termios.h>
#include <unistd.h>
int tcgetattr(
- int fildes,
- struct termios \*p
+ int fildes,
+ struct termios *p
);
**STATUS CODES:**
-*EBADF*
- Invalid file descriptor
+.. list-table::
+ :class: rtems-table
-*ENOOTY*
- Terminal control function attempted for a file that is not a terminal.
+ * - ``EBADF``
+ - Invalid file descriptor
+ * - ``ENOOTY``
+ - Terminal control function attempted for a file that is not a terminal.
**DESCRIPTION:**
-The ``tcgetattr()`` gets the parameters associated with the terminal
-referred to by ``fildes`` and stores them into the ``termios()``
-structure pointed to by ``termios_p``.
+The ``tcgetattr()`` gets the parameters associated with the terminal referred
+to by ``fildes`` and stores them into the ``termios()`` structure pointed to by
+``termios_p``.
**NOTES:**
NONE
+.. _tcsetattr:
+
tcsetattr - Set terminal attributes
-----------------------------------
.. index:: tcsetattr
@@ -227,25 +249,30 @@ tcsetattr - Set terminal attributes
**CALLING SEQUENCE:**
-.. code:: c
+.. code-block:: c
#include <termios.h>
#include <unistd.h>
int tcsetattr(
- int fildes,
- int options,
- const struct termios \*tp
+ int fildes,
+ int options,
+ const struct termios *tp
);
**STATUS CODES:**
-*E*
- The
+.. list-table::
+ :class: rtems-table
+
+ * - ``E``
+ - The
**DESCRIPTION:**
**NOTES:**
+.. _tcsendbreak:
+
tcsendbreak - Sends a break to a terminal
-----------------------------------------
.. index:: tcsendbreak
@@ -253,16 +280,19 @@ tcsendbreak - Sends a break to a terminal
**CALLING SEQUENCE:**
-.. code:: c
+.. code-block:: c
int tcsendbreak(
- int fd
+ int fd
);
**STATUS CODES:**
-*E*
- The
+.. list-table::
+ :class: rtems-table
+
+ * - ``E``
+ - The
**DESCRIPTION:**
@@ -271,6 +301,8 @@ tcsendbreak - Sends a break to a terminal
This routine is not currently supported by RTEMS but could be
in a future version.
+.. _tcdrain:
+
tcdrain - Waits for all output to be transmitted to the terminal.
-----------------------------------------------------------------
.. index:: tcdrain
@@ -278,33 +310,37 @@ tcdrain - Waits for all output to be transmitted to the terminal.
**CALLING SEQUENCE:**
-.. code:: c
+.. code-block:: c
#include <termios.h>
#include <unistd.h>
int tcdrain(
- int fildes
+ int fildes
);
**STATUS CODES:**
-*EBADF*
- Invalid file descriptor
+.. list-table::
+ :class: rtems-table
-*EINTR*
- Function was interrupted by a signal
-
-*ENOTTY*
- Terminal control function attempted for a file that is not a terminal.
+ * - ``EBADF``
+ - Invalid file descriptor
+ * - ``EINTR``
+ - Function was interrupted by a signal
+ * - ``ENOTTY``
+ - Terminal control function attempted for a file that is not a terminal.
**DESCRIPTION:**
-The ``tcdrain()`` function waits until all output written to``fildes`` has been transmitted.
+The ``tcdrain()`` function waits until all output written to ``fildes`` has been
+transmitted.
**NOTES:**
NONE
+.. _tcflush:
+
tcflush - Discards terminal data
--------------------------------
.. index:: tcflush
@@ -312,23 +348,28 @@ tcflush - Discards terminal data
**CALLING SEQUENCE:**
-.. code:: c
+.. code-block:: c
int tcflush(
- int fd
+ int fd
);
**STATUS CODES:**
-*E*
- The
+.. list-table::
+ :class: rtems-table
+
+ * - ``E``
+ - The
**DESCRIPTION:**
**NOTES:**
-This routine is not currently supported by RTEMS but could be
-in a future version.
+This routine is not currently supported by RTEMS but could be in a future
+version.
+
+.. _tcflow:
tcflow - Suspends/restarts terminal output.
-------------------------------------------
@@ -337,23 +378,28 @@ tcflow - Suspends/restarts terminal output.
**CALLING SEQUENCE:**
-.. code:: c
+.. code-block:: c
int tcflow(
- int fd
+ int fd
);
**STATUS CODES:**
-*E*
- The
+.. list-table::
+ :class: rtems-table
+
+ * - ``E``
+ - The
**DESCRIPTION:**
**NOTES:**
-This routine is not currently supported by RTEMS but could be
-in a future version.
+This routine is not currently supported by RTEMS but could be in a future
+version.
+
+.. _tcgetpgrp:
tcgetpgrp - Gets foreground process group ID
--------------------------------------------
@@ -362,22 +408,27 @@ tcgetpgrp - Gets foreground process group ID
**CALLING SEQUENCE:**
-.. code:: c
+.. code-block:: c
int tcgetpgrp(
);
**STATUS CODES:**
-*E*
- The
+.. list-table::
+ :class: rtems-table
+
+ * - ``E``
+ - The
**DESCRIPTION:**
**NOTES:**
-This routine is not currently supported by RTEMS but could be
-in a future version.
+This routine is not currently supported by RTEMS but could be in a future
+version.
+
+.. _tcsetpgrp:
tcsetpgrp - Sets foreground process group ID
--------------------------------------------
@@ -386,26 +437,22 @@ tcsetpgrp - Sets foreground process group ID
**CALLING SEQUENCE:**
-.. code:: c
+.. code-block:: c
int tcsetpgrp(
);
**STATUS CODES:**
-*E*
- The
+.. list-table::
+ :class: rtems-table
+
+ * - ``E``
+ - The
**DESCRIPTION:**
**NOTES:**
-This routine is not currently supported by RTEMS but could be
-in a future version.
-
-.. COMMENT: COPYRIGHT (c) 1988-2002.
-
-.. COMMENT: On-Line Applications Research Corporation (OAR).
-
-.. COMMENT: All rights reserved.
-
+This routine is not currently supported by RTEMS but could be in a future
+version.