Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ cfgetispeed(3) — posix — mips UMIPS RISC/os 4.52

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

tcsetattr(3)



CFGETISPEED(3-POSIX)RISC/os Reference Manual CFGETISPEED(3-POSIX)



NAME
     cfgetispeed, cfgetospeed, cfsetispeed, cfsetospeed - baud
     rate functions

SYNOPSIS
     #include <termios.h>

     speedt cfgetispeed(termiosp)
     struct termios *termiosp;

     speedt cfgetospeed(termiosp)
     struct termios *termiosp;

     int cfsetispeed(termiosp, speed)
     struct termios *termiosp;
     speedt speed;

     int cfsetospeed(termiosp, speed)
     struct termios *termiosp;
     speedt speed;

DESCRIPTION
     These functions are used to get or set the values of the
     input and output baud rates in the termios structure.  Any
     changes to this structure are not effective until tcsetattr
     is successfully called.

     termios_p is a pointer to a termios structure.

     cfgetispeed returns the input baud rate stored in the ter-
     mios structure pointed to by termios_p.

     cfgetospeed returns the output baud rate stored in the ter-
     mios structure.

     cfsetispeed sets the input baud rate in the termios struc-
     ture to speed.  If the input baud rate is set to zero, the
     input baud rate will be the same as the output baud rate.

     cfsetospeed sets the output baud rate in the termios struc-
     ture to speed.  B0 is used to terminate the connection; if
     B0 is specified, the modem control lines are no longer
     asserted (the line is disconnected).

     The input and output baud rates may have the following
     values:

          Name    Description          Name    Description
          B0      hang up              B600    600 baud
          B50     50 baud              B1200   1200 baud
          B75     75 baud              B1800   1800 baud
          B110    110 baud             B2400   2400 baud



                         Printed 1/15/91                   Page 1





CFGETISPEED(3-POSIX)RISC/os Reference Manual CFGETISPEED(3-POSIX)



          B134    134.5 baud           B4800   4800 baud
          B150    150 baud             B9600   9600 baud
          B200    200 baud             B19200  19200 baud
          B300    300 baud             B38400  38400 baud

RETURN VALUES
     cfgetispeed and cfsetispeed return exactly the value found
     in the termios data structure, without interpretation.

     Both cfsetispeed and cfsetospeed return 0 if successful and
     -1 to indicate an error.  Any attempt to set unsupported
     baud rates is ignored.

ERRORS
     If the following condition occurs, cfgetispeed, cfgetospeed,
     cfsetispeed, and cfsetospeed return -1 and set errno to the
     corresponding value:

     [EFAULT]            termios_p points outside the process'
                         allocated address space.

     If the following condition occurs, cfsetispeed and
     cfsetospeed return -1 and set errno to the corresponding
     value:

     [EINVAL]            speed is not a valid baud rate.

SEE ALSO
     tcsetattr(3).


























 Page 2                  Printed 1/15/91



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026