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 2016/09/26 22:21:02 UTC

[1/3] incubator-mynewt-core git commit: shell; multiple calls to console_init(), both from package init as well as when task is started. Just keep one.

Repository: incubator-mynewt-core
Updated Branches:
  refs/heads/develop b98fe7095 -> 7b78fafdc


shell; multiple calls to console_init(), both from package init as
well as when task is started. Just keep one.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/1f03e468
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/1f03e468
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/1f03e468

Branch: refs/heads/develop
Commit: 1f03e4683f98cc08b7cf734fb69e1dee877d67f9
Parents: 821dfdc
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Mon Sep 26 14:26:08 2016 -0700
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Mon Sep 26 15:19:32 2016 -0700

----------------------------------------------------------------------
 libs/shell/src/shell.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/1f03e468/libs/shell/src/shell.c
----------------------------------------------------------------------
diff --git a/libs/shell/src/shell.c b/libs/shell/src/shell.c
index be9acde..3aba773 100644
--- a/libs/shell/src/shell.c
+++ b/libs/shell/src/shell.c
@@ -462,9 +462,6 @@ shell_task_func(void *arg)
 {
     struct os_event *ev;
 
-    console_rdy_ev.ev_type = OS_EVENT_T_CONSOLE_RDY;
-    console_init(shell_console_rx_cb);
-
     while (1) {
         ev = os_eventq_get(&shell_evq);
         assert(ev != NULL);
@@ -560,7 +557,7 @@ shell_init(void)
 
     rc = shell_cmd_register(&g_shell_prompt_cmd);
     SYSINIT_PANIC_ASSERT(rc == 0);
-    
+
     rc = shell_cmd_register(&g_shell_os_tasks_display_cmd);
     SYSINIT_PANIC_ASSERT(rc == 0);
 
@@ -572,7 +569,7 @@ shell_init(void)
 
     os_eventq_init(&shell_evq);
     os_mqueue_init(&g_shell_nlip_mq, NULL);
-
+    console_rdy_ev.ev_type = OS_EVENT_T_CONSOLE_RDY;
     console_init(shell_console_rx_cb);
 
     rc = os_task_init(&shell_task, "shell", shell_task_func,


[2/3] incubator-mynewt-core git commit: console; check that console is initialized before trying to output crash data.

Posted by ma...@apache.org.
console; check that console is initialized before trying to output
crash data.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/821dfdc6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/821dfdc6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/821dfdc6

Branch: refs/heads/develop
Commit: 821dfdc66145897641358a2941538ed7268d9843
Parents: b98fe70
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Mon Sep 26 14:15:59 2016 -0700
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Mon Sep 26 15:19:32 2016 -0700

----------------------------------------------------------------------
 libs/console/full/src/cons_tty.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/821dfdc6/libs/console/full/src/cons_tty.c
----------------------------------------------------------------------
diff --git a/libs/console/full/src/cons_tty.c b/libs/console/full/src/cons_tty.c
index 0b4fab4..2b5ea97 100644
--- a/libs/console/full/src/cons_tty.c
+++ b/libs/console/full/src/cons_tty.c
@@ -152,9 +152,11 @@ console_blocking_mode(void)
     int sr;
 
     OS_ENTER_CRITICAL(sr);
-    ct->ct_write_char = console_blocking_tx;
+    if (ct->ct_write_char) {
+        ct->ct_write_char = console_blocking_tx;
 
-    console_tx_flush(ct, CONSOLE_TX_BUF_SZ);
+        console_tx_flush(ct, CONSOLE_TX_BUF_SZ);
+    }
     OS_EXIT_CRITICAL(sr);
 }
 
@@ -409,7 +411,7 @@ console_init(console_rx_cb rx_cb)
     }
 
     console_print_prompt();
-    
+
     return 0;
 }
 


[3/3] incubator-mynewt-core git commit: console; console_write() checks whether console is initialized, remove dup checks.

Posted by ma...@apache.org.
console; console_write() checks whether console is initialized,
remove dup checks.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/7b78fafd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/7b78fafd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/7b78fafd

Branch: refs/heads/develop
Commit: 7b78fafdc59eeeb51cb6282172e14a860b92e656
Parents: 1f03e46
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Mon Sep 26 14:57:23 2016 -0700
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Mon Sep 26 15:19:33 2016 -0700

----------------------------------------------------------------------
 libs/console/full/src/cons_fmt.c | 8 --------
 1 file changed, 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/7b78fafd/libs/console/full/src/cons_fmt.c
----------------------------------------------------------------------
diff --git a/libs/console/full/src/cons_fmt.c b/libs/console/full/src/cons_fmt.c
index 9995322..2b64c01 100644
--- a/libs/console/full/src/cons_fmt.c
+++ b/libs/console/full/src/cons_fmt.c
@@ -41,10 +41,6 @@ console_printf(const char *fmt, ...)
 {
     va_list args;
 
-    if (!console_is_init()) {
-        return;
-    }
-
     /* Prefix each line with a timestamp. */
     if (!console_is_midline) {
         fprintf((FILE *)&console_file, "%lu:", (unsigned long)os_time_get());
@@ -64,10 +60,6 @@ console_printf(const char *fmt, ...)
     char buf[CONS_OUTPUT_MAX_LINE];
     int len;
 
-    if (!console_is_init()) {
-        return;
-    }
-
     /* Prefix each line with a timestamp. */
     if (!console_is_midline) {
         len = snprintf(buf, sizeof(buf), "%lu:", (unsigned long)os_time_get());