You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ma...@apache.org on 2015/11/24 01:54:49 UTC

[4/5] incubator-mynewt-larva git commit: Fix check for whether uart was open on not when tx'ing in blocking mode.

Fix check for whether uart was open on not when tx'ing
in blocking mode.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/commit/8de028fa
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/tree/8de028fa
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/diff/8de028fa

Branch: refs/heads/master
Commit: 8de028fae3cc52141fe935eeb0cb2ce94a0e2a31
Parents: 2ce1676
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Mon Nov 23 15:12:52 2015 -0800
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Mon Nov 23 15:12:52 2015 -0800

----------------------------------------------------------------------
 hw/mcu/stm/stm32f4xx/src/hal_uart.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/8de028fa/hw/mcu/stm/stm32f4xx/src/hal_uart.c
----------------------------------------------------------------------
diff --git a/hw/mcu/stm/stm32f4xx/src/hal_uart.c b/hw/mcu/stm/stm32f4xx/src/hal_uart.c
index 3ca76a6..17d91f0 100644
--- a/hw/mcu/stm/stm32f4xx/src/hal_uart.c
+++ b/hw/mcu/stm/stm32f4xx/src/hal_uart.c
@@ -146,7 +146,7 @@ hal_uart_blocking_tx(int port, uint8_t data)
     USART_TypeDef *regs;
 
     u = &uarts[port];
-    if (port >= UART_CNT || u->u_open) {
+    if (port >= UART_CNT || !u->u_open) {
         return;
     }
     regs = u->u_regs;