Lines Matching refs:tio
1125 struct termios *tio, tmp; in rt_serial_control() local
1129 tio = (struct termios*)args; in rt_serial_control()
1133 tio = &tmp; in rt_serial_control()
1136 if (tio == RT_NULL) return -RT_EINVAL; in rt_serial_control()
1138 tio->c_iflag = 0; in rt_serial_control()
1139 tio->c_oflag = 0; in rt_serial_control()
1140 tio->c_lflag = 0; in rt_serial_control()
1144 tio->c_oflag = OPOST | ONLCR; in rt_serial_control()
1147 tio->c_cflag = 0; in rt_serial_control()
1149 tio->c_cflag = CS5; in rt_serial_control()
1151 tio->c_cflag = CS6; in rt_serial_control()
1153 tio->c_cflag = CS7; in rt_serial_control()
1155 tio->c_cflag = CS8; in rt_serial_control()
1158 tio->c_cflag |= CSTOPB; in rt_serial_control()
1161 tio->c_cflag |= PARENB; in rt_serial_control()
1163 tio->c_cflag |= (PARODD | PARENB); in rt_serial_control()
1165 cfsetospeed(tio, _get_speed(serial->config.baud_rate)); in rt_serial_control()
1169 _termios_to_termio(tio, args); in rt_serial_control()
1182 struct termios *tio, tmp; in rt_serial_control() local
1187 tio = &tmp; in rt_serial_control()
1191 tio = (struct termios*)args; in rt_serial_control()
1194 if (tio == RT_NULL) return -RT_EINVAL; in rt_serial_control()
1197 baudrate = _get_baudrate(cfgetospeed(tio)); in rt_serial_control()
1200 switch (tio->c_cflag & CSIZE) in rt_serial_control()
1216 if (tio->c_cflag & CSTOPB) config.stop_bits = STOP_BITS_2; in rt_serial_control()
1219 if (tio->c_cflag & PARENB) in rt_serial_control()
1221 if (tio->c_cflag & PARODD) config.parity = PARITY_ODD; in rt_serial_control()