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/17 20:41:08 UTC

incubator-mynewt-larva git commit: Don't do printf to console until console is open.

Repository: incubator-mynewt-larva
Updated Branches:
  refs/heads/master c01ab4c7c -> 8a5b1ba5c


Don't do printf to console until console is open.


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/8a5b1ba5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/tree/8a5b1ba5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/diff/8a5b1ba5

Branch: refs/heads/master
Commit: 8a5b1ba5c6a7ea0ec754c2037f9b516d058ee05a
Parents: c01ab4c
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Tue Nov 17 09:28:02 2015 -0800
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Tue Nov 17 11:40:31 2015 -0800

----------------------------------------------------------------------
 hw/mcu/native/src/hal_uart.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/8a5b1ba5/hw/mcu/native/src/hal_uart.c
----------------------------------------------------------------------
diff --git a/hw/mcu/native/src/hal_uart.c b/hw/mcu/native/src/hal_uart.c
index bf0530a..bcd434d 100644
--- a/hw/mcu/native/src/hal_uart.c
+++ b/hw/mcu/native/src/hal_uart.c
@@ -256,7 +256,6 @@ hal_uart_config(int port, int32_t baudrate, uint8_t databits, uint8_t stopbits,
         uart->u_fd = uart_pty(port);
     } else {
         uart->u_fd = fileno_unlocked(stdout);
-        printf("uart%d at stdout\n", port);
     }
     if (uart->u_fd < 0) {
         return -1;
@@ -264,5 +263,8 @@ hal_uart_config(int port, int32_t baudrate, uint8_t databits, uint8_t stopbits,
     set_nonblock(uart->u_fd);
 
     uart->u_open = 1;
+    if (port == CONSOLE_UART) {
+        printf("uart%d at stdout\n", port);
+    }
     return 0;
 }