diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-07-24 15:10:21 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-07-24 15:10:21 +0000 |
commit | 6d2bcd43a9a90e4be63c1bc29f14882a8db536df (patch) | |
tree | d9193962a4631ab2b77486d8192377c05862ee8f /nuttx/arch/arm | |
parent | bbae2a800dec1c8f22c3a2bf1d95affb68112746 (diff) | |
download | px4-nuttx-6d2bcd43a9a90e4be63c1bc29f14882a8db536df.tar.gz px4-nuttx-6d2bcd43a9a90e4be63c1bc29f14882a8db536df.tar.bz2 px4-nuttx-6d2bcd43a9a90e4be63c1bc29f14882a8db536df.zip |
Remove BOTHER
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4972 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/arm')
-rw-r--r-- | nuttx/arch/arm/src/stm32/stm32_serial.c | 26 |
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; |