mesh_driver/lunix-attach.c
static int tty_set_databits(struct termios *tty, char *databits)
{
	tty->c_cflag &= ~CSIZE;
	switch(*databits) {
	case '5':
		tty->c_cflag |= CS5;
		break;

	case '6':
		tty->c_cflag |= CS6;
		break;

	case '7':
		tty->c_cflag |= CS7;
		break;

	case '8':
		tty->c_cflag |= CS8;
		break;

	default:
		return -EINVAL;
	}  	

	return 0;
}
/* Set the number of data bits. */
Set the number of data bits.
Set the number of data bits .
static int tty_set_databits(struct termios *tty, char *databits)
{
	tty->c_cflag &= ~CSIZE;
	switch(*databits) {
	case '5':
		tty->c_cflag |= CS5;
		break;
	case '6':
		tty->c_cflag |= CS6;
		break;
	case '7':
		tty->c_cflag |= CS7;
		break;
	case '8':
		tty->c_cflag |= CS8;
		break;
	default:
		return -EINVAL;
	}  	
	return 0;
}
static int tty_set_databits ( struct termios * tty , char * databits ) { tty -> c_cflag &= ~ CSIZE ; switch ( * databits ) { case ' ' : tty -> c_cflag |= CS5 ; break ; case ' ' : tty -> c_cflag |= CS6 ; break ; case ' ' : tty -> c_cflag |= CS7 ; break ; case ' ' : tty -> c_cflag |= CS8 ; break ; default : return - EINVAL ; } return 0 ; }
Set the number of data bits.
Set the number of data bits .