Your Browser is not longer supported
Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...
{{viewport.spaceProperty.prod}}
cfsetispeed - set input baud rate
&pagelevel(4)&pagelevel
Syntax | #include <termios.h> int cfsetispeed(struct termios *termios_p, speed_t speed); |
Description | cfsetispeed() sets the input baud rate in the termios structure pointed to by termios_p to the value of speed.
cfsetispeed() has no effect on the baud rates set in the hardware until a subsequent successful call to tcsetattr() on the same termios structure.
Extension Only the corresponding value in the termios structure is changed. Since different baud rates are not supported by the hardware, it is only relevant whether or not this value is equal to zero. All baud rates defined in termios.h can, however, be specified and stored in the termios s tructure. If baud rates which are not defined in termios.h are specified, they are not stored: -1 is returned, and errno is set to the value EINVAL . See tcsetattr() for more details. If the input baud rate is set to zero, it is assigned the value of the output baud rate. Attempts to set unsupported baud rates are ignored. This applies to changes to baud rates not supported by the hardware and to the setting of different input and output baud rates (if this is not supported by the hardware). (End) |
Return val. | 0 -1 | if successful. if an error occurs. errno is set to indicate the error. |
Errors | cfsetispeed() will fail if:
|
EINVAL
| speed is not a valid baud rate (e.g. 9999) or the value of speed is not within the permitted range of values defined in termios.h . |
See also | cfgetispeed() , cfgetospeed() , cfsetospeed() , tcsetattr() , termios.h , section“General terminal interface”.
|