mesh_driver/lunix-attach.c
static int tty_set_raw(struct termios *tty)
{
	int i;
	int speed;
	
	for (i = 0; i < NCCS; i++)
		tty->c_cc[i] = '\0';		/* no spec chr		*/
	tty->c_cc[VMIN] = 1;
	tty->c_cc[VTIME] = 0;
	tty->c_iflag = (IGNBRK | IGNPAR);	/* input flags		*/
	tty->c_oflag = (0);			/* output flags		*/
	tty->c_lflag = (0);			/* local flags		*/
	speed = (tty->c_cflag & CBAUD);		/* save current speed	*/
	tty->c_cflag = (CRTSCTS | HUPCL | CREAD); /* UART flags		*/
	tty->c_cflag |= CLOCAL;
	tty->c_cflag |= speed;			/* restore speed	*/
	
	return 0;
}
/* Put a terminal line in a transparent state. */
Put a terminal line in a transparent state.
Put a terminal line in a transparent state .
static int tty_set_raw(struct termios *tty)
{
	int i;
	int speed;
	for (i = 0; i < NCCS; i++)
		tty->c_cc[i] = '\0';		
	tty->c_cc[VMIN] = 1;
	tty->c_cc[VTIME] = 0;
	tty->c_iflag = (IGNBRK | IGNPAR);	
	tty->c_oflag = (0);			
	tty->c_lflag = (0);			
	speed = (tty->c_cflag & CBAUD);		
	tty->c_cflag = (CRTSCTS | HUPCL | CREAD); 
	tty->c_cflag |= CLOCAL;
	tty->c_cflag |= speed;			
	return 0;
}
static int tty_set_raw ( struct termios * tty ) { int i ; int speed ; for ( i = 0 ; i < NCCS ; i ++ ) tty -> c_cc [ i ] = ' \0 ' ; tty -> c_cc [ VMIN ] = 1 ; tty -> c_cc [ VTIME ] = 0 ; tty -> c_iflag = ( IGNBRK | IGNPAR ) ; tty -> c_oflag = ( 0 ) ; tty -> c_lflag = ( 0 ) ; speed = ( tty -> c_cflag & CBAUD ) ; tty -> c_cflag = ( CRTSCTS | HUPCL | CREAD ) ; tty -> c_cflag |= CLOCAL ; tty -> c_cflag |= speed ; return 0 ; }
Put a terminal line in a transparent state.
Put a terminal line in a transparent state .
/* no spec chr		*/ /* input flags		*/ /* output flags		*/ /* local flags		*/ /* save current speed	*/ /* UART flags		*/ /* restore speed	*/