Lines Matching refs:new_tc
90 struct termios new_tc; in config_comm() local
92 memset(&new_tc, 0x00, sizeof(struct termios)); in config_comm()
96 new_tc.c_cflag |= (CLOCAL | CREAD);//Enable in default. in config_comm()
101 cfsetispeed(&new_tc, valid_baud_rate);//input speed in config_comm()
102 cfsetospeed(&new_tc, valid_baud_rate);//output speed in config_comm()
111 new_tc.c_cflag &= ~PARENB; //Disable parity. in config_comm()
115 new_tc.c_cflag |= PARENB; //Enable parity. in config_comm()
116 new_tc.c_cflag |= PARODD; //Odd parity. in config_comm()
120 new_tc.c_cflag |= PARENB; //Enable parity. in config_comm()
121 new_tc.c_cflag &= ~PARODD; //even parity. in config_comm()
128 new_tc.c_cflag &= ~CSIZE; in config_comm()
136 new_tc.c_cflag |= CS7; in config_comm()
139 new_tc.c_cflag |= CS8; in config_comm()
146 (stop_bits == 2)?(new_tc.c_cflag |= CSTOPB):(new_tc.c_cflag &= ~ CSTOPB); in config_comm()
152 if( tcsetattr(fd, TCSANOW, &new_tc) != 0) in config_comm()