mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-25 23:53:33 +08:00
Remove BOTHER
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4972 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
@@ -1248,15 +1248,9 @@ static int up_ioctl(struct file *filep, int cmd, unsigned long arg)
|
||||
break;
|
||||
}
|
||||
|
||||
/* TODO: (1) Note that only the BOTHER baud is returned; (2) Other
|
||||
* termios fields are not yet initialized. Here we also exploit the
|
||||
* internal knowledge that ctfsetospeed() is equivalent to
|
||||
* cfsetispeed().
|
||||
*/
|
||||
/* TODO: Other termios fields are not yet returned. */
|
||||
|
||||
cfsetispeed(termiosp, BOTHER);
|
||||
termiosp->c_ispeed = priv->baud;
|
||||
termiosp->c_ospeed = priv->baud;
|
||||
termiosp->c_speed = priv->baud;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1270,19 +1264,9 @@ static int up_ioctl(struct file *filep, int cmd, unsigned long arg)
|
||||
break;
|
||||
}
|
||||
|
||||
/* TODO: Only the BOTHER speed setting is supported. Here we
|
||||
* also exploit the internal knowledge that ctfgetospeed() is
|
||||
* equivalent to cfgetispeed().
|
||||
*/
|
||||
/* TODO: Handle other termios settings. */
|
||||
|
||||
if (cfgetospeed(termiosp) != BOTHER ||
|
||||
termiosp->c_ispeed != termiosp->c_ospeed)
|
||||
{
|
||||
ret = -ENOSYS;
|
||||
break;
|
||||
}
|
||||
|
||||
priv->baud = termiosp->c_ispeed;
|
||||
priv->baud = termiosp->c_speed;
|
||||
up_setspeed(dev);
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user