|
|
HP-UX Reference > Ccfspeed(3C)HP-UX 11i Version 2: December 2007 Update |
|
NAMEcfgetospeed(), cfsetospeed(), cfgetispeed(), cfsetispeed() — tty baud rate functions SYNOPSIS#include <termios.h> speed_t cfgetospeed(const struct termios *termios_p); int cfsetospeed(struct termios *termios_p, speed_t speed); speed_t cfgetispeed(const struct termios *termios_p); int cfsetispeed(struct termios *termios_p, speed_t speed); DESCRIPTIONThese functions set and get the input and output speed codes in the termios structure referenced by termios_p. The termios structure contains these speed codes representing input and output baud rates as well as other terminal related parameters. Setting the parameters on a terminal file does not become effective until tcsetattr() is successfully called.
RETURN VALUEcfgetospeed() returns the output speed code from the termios structure referenced by termios_p. cfgetispeed() returns the input speed code from the termios structure referenced by termios_p. cfsetispeed() and cfsetospeed() return zero upon successful completion. Otherwise, they return -1 and set errno to indicate the error. ERRORScfsetispeed() and cfsetospeed() fail when the following condition is encountered:
|
|