mesh_driver/lunix-attach.c
static int tty_set_parity(struct termios *tty, char *parity)
{
	switch(toupper(*parity)) {
	case 'N':
		tty->c_cflag &= ~(PARENB | PARODD);
		break;  

	case 'O':
		tty->c_cflag &= ~(PARENB | PARODD);
		tty->c_cflag |= (PARENB | PARODD);
		break;

	case 'E':
		tty->c_cflag &= ~(PARENB | PARODD);
		tty->c_cflag |= (PARENB);
		break;

	default:
		return -EINVAL;
	}

	return 0;
}
/* Set the type of parity encoding. */
Set the type of parity encoding.
Set the type of parity encoding .
static int tty_set_parity(struct termios *tty, char *parity)
{
	switch(toupper(*parity)) {
	case 'N':
		tty->c_cflag &= ~(PARENB | PARODD);
		break;  
	case 'O':
		tty->c_cflag &= ~(PARENB | PARODD);
		tty->c_cflag |= (PARENB | PARODD);
		break;
	case 'E':
		tty->c_cflag &= ~(PARENB | PARODD);
		tty->c_cflag |= (PARENB);
		break;
	default:
		return -EINVAL;
	}
	return 0;
}
static int tty_set_parity ( struct termios * tty , char * parity ) { switch ( toupper ( * parity ) ) { case ' ' : tty -> c_cflag &= ~ ( PARENB | PARODD ) ; break ; case ' ' : tty -> c_cflag &= ~ ( PARENB | PARODD ) ; tty -> c_cflag |= ( PARENB | PARODD ) ; break ; case ' ' : tty -> c_cflag &= ~ ( PARENB | PARODD ) ; tty -> c_cflag |= ( PARENB ) ; break ; default : return - EINVAL ; } return 0 ; }
Set the type of parity encoding.
Set the type of parity encoding .