Lines Matching refs:ter

47 static inline void native_tty_termios_defaults_set(struct termios *ter)  in native_tty_termios_defaults_set()  argument
54 ter->c_lflag &= ~(ICANON | ISIG | ECHO); in native_tty_termios_defaults_set()
59 ter->c_oflag &= ~(OPOST | ONLCR); in native_tty_termios_defaults_set()
62 ter->c_iflag &= ~(IXON | IXOFF | IXANY); in native_tty_termios_defaults_set()
65 ter->c_cc[VMIN] = 0; in native_tty_termios_defaults_set()
66 ter->c_cc[VTIME] = 0; in native_tty_termios_defaults_set()
69 ter->c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP | INLCR | IGNCR | ICRNL); in native_tty_termios_defaults_set()
72 ter->c_cflag |= CREAD | CLOCAL; in native_tty_termios_defaults_set()
81 static inline void native_tty_baud_speed_set(struct termios *ter, int baudrate) in native_tty_baud_speed_set() argument
85 cfsetospeed(ter, baudrate_lut[i].termios_baudrate); in native_tty_baud_speed_set()
86 cfsetispeed(ter, baudrate_lut[i].termios_baudrate); in native_tty_baud_speed_set()
99 static inline void native_tty_baud_parity_set(struct termios *ter, in native_tty_baud_parity_set() argument
104 ter->c_cflag &= ~PARENB; in native_tty_baud_parity_set()
107 ter->c_cflag |= PARENB; in native_tty_baud_parity_set()
108 ter->c_cflag |= PARODD; in native_tty_baud_parity_set()
111 ter->c_cflag |= PARENB; in native_tty_baud_parity_set()
112 ter->c_cflag &= ~PARODD; in native_tty_baud_parity_set()
127 static inline void native_tty_stop_bits_set(struct termios *ter, in native_tty_stop_bits_set() argument
132 ter->c_cflag &= ~CSTOPB; in native_tty_stop_bits_set()
135 ter->c_cflag |= CSTOPB; in native_tty_stop_bits_set()
150 static inline void native_tty_data_bits_set(struct termios *ter, in native_tty_data_bits_set() argument
174 ter->c_cflag &= ~CSIZE; in native_tty_data_bits_set()
175 ter->c_cflag |= data_bits_to_set; in native_tty_data_bits_set()
200 struct termios ter; in native_tty_configure_bottom() local
203 rc = tcgetattr(fd, &ter); in native_tty_configure_bottom()
209 native_tty_termios_defaults_set(&ter); in native_tty_configure_bottom()
211 native_tty_baud_speed_set(&ter, cfg->baudrate); in native_tty_configure_bottom()
212 native_tty_baud_parity_set(&ter, cfg->parity); in native_tty_configure_bottom()
213 native_tty_stop_bits_set(&ter, cfg->stop_bits); in native_tty_configure_bottom()
214 native_tty_data_bits_set(&ter, cfg->data_bits); in native_tty_configure_bottom()
218 rc = tcsetattr(fd, TCSANOW, &ter); in native_tty_configure_bottom()
238 if (ter.c_cflag != read_ter.c_cflag || ter.c_iflag != read_ter.c_iflag || in native_tty_configure_bottom()
239 ter.c_oflag != read_ter.c_oflag || ter.c_lflag != read_ter.c_lflag || in native_tty_configure_bottom()
240 ter.c_line != read_ter.c_line || ter.c_ispeed != read_ter.c_ispeed || in native_tty_configure_bottom()
241 ter.c_ospeed != read_ter.c_ospeed || 0 != memcmp(ter.c_cc, read_ter.c_cc, NCCS)) { in native_tty_configure_bottom()