aboutsummaryrefslogtreecommitdiff
path: root/nuttx/arch
diff options
context:
space:
mode:
authorpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2012-07-24 15:10:21 +0000
committerpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2012-07-24 15:10:21 +0000
commit393b2646c236cd126991d863a4e67be623363a4b (patch)
treed9193962a4631ab2b77486d8192377c05862ee8f /nuttx/arch
parent464f8d822bef09dbb7d9d3839454f0d4d542f257 (diff)
downloadpx4-firmware-393b2646c236cd126991d863a4e67be623363a4b.tar.gz
px4-firmware-393b2646c236cd126991d863a4e67be623363a4b.tar.bz2
px4-firmware-393b2646c236cd126991d863a4e67be623363a4b.zip
Remove BOTHER
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4972 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx/arch')
-rw-r--r--nuttx/arch/arm/src/stm32/stm32_serial.c26
1 files changed, 5 insertions, 21 deletions
diff --git a/nuttx/arch/arm/src/stm32/stm32_serial.c b/nuttx/arch/arm/src/stm32/stm32_serial.c
index aaed6270f..0546bb7ff 100644
--- a/nuttx/arch/arm/src/stm32/stm32_serial.c
+++ b/nuttx/arch/arm/src/stm32/stm32_serial.c
@@ -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().
- */
-
- cfsetispeed(termiosp, BOTHER);
- termiosp->c_ispeed = priv->baud;
- termiosp->c_ospeed = priv->baud;
+ /* TODO: Other termios fields are not yet returned. */
+
+ 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().
- */
-
- if (cfgetospeed(termiosp) != BOTHER ||
- termiosp->c_ispeed != termiosp->c_ospeed)
- {
- ret = -ENOSYS;
- break;
- }
+ /* TODO: Handle other termios settings. */
- priv->baud = termiosp->c_ispeed;
+ priv->baud = termiosp->c_speed;
up_setspeed(dev);
}
break;