projects
/
platform
/
core
/
api
/
peripheral-io.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e19797b
)
uart: update c_cflag of termios without erasing existing set value when setting baud...
74/168374/1
author
Segwon
<segwon.han@samsung.com>
Wed, 24 Jan 2018 08:12:50 +0000
(17:12 +0900)
committer
Segwon Han
<segwon.han@samsung.com>
Fri, 26 Jan 2018 05:58:41 +0000
(
05:58
+0000)
Change-Id: I6976042de284fd991eebab9a812d5ce5405fe80c
Signed-off-by: Segwon <segwon.han@samsung.com>
src/interface/peripheral_interface_uart.c
patch
|
blob
|
history
diff --git
a/src/interface/peripheral_interface_uart.c
b/src/interface/peripheral_interface_uart.c
index
afa4aa0
..
7ebcf61
100644
(file)
--- a/
src/interface/peripheral_interface_uart.c
+++ b/
src/interface/peripheral_interface_uart.c
@@
-145,7
+145,8
@@
int peripheral_interface_uart_set_baud_rate(peripheral_uart_h uart, peripheral_u
ret = tcgetattr(uart->fd, &tio);
CHECK_ERROR(ret != 0);
- tio.c_cflag = peripheral_uart_br[baud];
+ tio.c_cflag &= ~__MAX_BAUD;
+ tio.c_cflag |= peripheral_uart_br[baud];
peripheral_interface_uart_flush(uart);