Remove BOTHER
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4972 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
bbfddf5ad6
commit
4c612c24a9
@ -1248,15 +1248,9 @@ static int up_ioctl(struct file *filep, int cmd, unsigned long arg)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO: (1) Note that only the BOTHER baud is returned; (2) Other
|
/* TODO: Other termios fields are not yet returned. */
|
||||||
* termios fields are not yet initialized. Here we also exploit the
|
|
||||||
* internal knowledge that ctfsetospeed() is equivalent to
|
|
||||||
* cfsetispeed().
|
|
||||||
*/
|
|
||||||
|
|
||||||
cfsetispeed(termiosp, BOTHER);
|
termiosp->c_speed = priv->baud;
|
||||||
termiosp->c_ispeed = priv->baud;
|
|
||||||
termiosp->c_ospeed = priv->baud;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -1270,19 +1264,9 @@ static int up_ioctl(struct file *filep, int cmd, unsigned long arg)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO: Only the BOTHER speed setting is supported. Here we
|
/* TODO: Handle other termios settings. */
|
||||||
* also exploit the internal knowledge that ctfgetospeed() is
|
|
||||||
* equivalent to cfgetispeed().
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (cfgetospeed(termiosp) != BOTHER ||
|
priv->baud = termiosp->c_speed;
|
||||||
termiosp->c_ispeed != termiosp->c_ospeed)
|
|
||||||
{
|
|
||||||
ret = -ENOSYS;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
priv->baud = termiosp->c_ispeed;
|
|
||||||
up_setspeed(dev);
|
up_setspeed(dev);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user