Function termios::cfsetispeed
[−]
[src]
pub fn cfsetispeed(termios: &mut Termios, speed: speed_t) -> Result<()>
Sets the input baud rate.
This function only sets the necessary values on the given Termios structure. The settings are
applied by a subsequent call to tcsetattr().
Parameters
termiosshould be a mutable reference to aTermiosstructure.speedshould be one of the baud rate constants:B0B50B75B110B134B150B200B300B600B1200B1800B2400B4800B9600B19200B38400- any OS-specific baud rate defined in
termios::os.
A value of B0 for speed sets the input baud rate to be the same as the output baud rate.
Examples
cfsetispeed(&mut termios, B9600).unwrap(); assert_eq!(cfgetispeed(&termios), B9600);