You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2016/07/28 19:51:12 UTC
[3/3] incubator-mynewt-core git commit: shell;
call console_init() from shell task context instead of app main.
shell; call console_init() from shell task context instead of app main.
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/b65435f3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/b65435f3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/b65435f3
Branch: refs/heads/0_10_0_dev
Commit: b65435f319905d6b2b6cbcae7e6533303d18fcc5
Parents: d97034d
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Thu Jul 28 11:16:12 2016 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Thu Jul 28 12:51:00 2016 -0700
----------------------------------------------------------------------
apps/bletest/src/main.c | 4 ----
apps/bletiny/src/main.c | 4 ----
apps/blinky/src/main.c | 2 --
apps/luatest/src/main.c | 1 -
apps/slinky/src/main.c | 6 ++----
libs/shell/src/shell.c | 1 +
6 files changed, 3 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/b65435f3/apps/bletest/src/main.c
----------------------------------------------------------------------
diff --git a/apps/bletest/src/main.c b/apps/bletest/src/main.c
index 6c59532..dbfa053 100755
--- a/apps/bletest/src/main.c
+++ b/apps/bletest/src/main.c
@@ -1105,10 +1105,6 @@ main(void)
g_led_pin = LED_BLINK_PIN;
hal_gpio_init_out(g_led_pin, 1);
- /* Init the console */
- rc = console_init(shell_console_rx_cb);
- assert(rc == 0);
-
#if 0
rc = hal_flash_init();
assert(rc == 0);
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/b65435f3/apps/bletiny/src/main.c
----------------------------------------------------------------------
diff --git a/apps/bletiny/src/main.c b/apps/bletiny/src/main.c
index f5c57ba..733f8d1 100755
--- a/apps/bletiny/src/main.c
+++ b/apps/bletiny/src/main.c
@@ -1661,10 +1661,6 @@ main(void)
rc = os_msys_register(&default_mbuf_pool);
assert(rc == 0);
- /* Initialize the console (for shell and logging). */
- rc = console_init(shell_console_rx_cb);
- assert(rc == 0);
-
/* Create the shell task. */
rc = shell_task_init(SHELL_TASK_PRIO, shell_stack, SHELL_TASK_STACK_SIZE,
SHELL_MAX_INPUT_LEN);
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/b65435f3/apps/blinky/src/main.c
----------------------------------------------------------------------
diff --git a/apps/blinky/src/main.c b/apps/blinky/src/main.c
index 24d0311..4d797b3 100755
--- a/apps/blinky/src/main.c
+++ b/apps/blinky/src/main.c
@@ -178,8 +178,6 @@ main(int argc, char **argv)
shell_task_init(SHELL_TASK_PRIO, shell_stack, SHELL_TASK_STACK_SIZE,
SHELL_MAX_INPUT_LEN);
- (void) console_init(shell_console_rx_cb);
-
stats_module_init();
rc = init_tasks();
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/b65435f3/apps/luatest/src/main.c
----------------------------------------------------------------------
diff --git a/apps/luatest/src/main.c b/apps/luatest/src/main.c
index 76dd13f..9cd3d5a 100755
--- a/apps/luatest/src/main.c
+++ b/apps/luatest/src/main.c
@@ -88,7 +88,6 @@ main(int argc, char **argv)
/* Init tasks */
shell_task_init(SHELL_TASK_PRIO, shell_stack, SHELL_TASK_STACK_SIZE,
SHELL_MAX_INPUT_LEN);
- console_init(shell_console_rx_cb);
nffs_init();
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/b65435f3/apps/slinky/src/main.c
----------------------------------------------------------------------
diff --git a/apps/slinky/src/main.c b/apps/slinky/src/main.c
index f57657f..d9dd29a 100755
--- a/apps/slinky/src/main.c
+++ b/apps/slinky/src/main.c
@@ -58,7 +58,7 @@ volatile int tasks_initialized;
int init_tasks(void);
/* Task 1 */
-#define TASK1_PRIO (1)
+#define TASK1_PRIO (8)
#define TASK1_STACK_SIZE OS_STACK_ALIGN(128)
#define MAX_CBMEM_BUF 600
struct os_task task1;
@@ -66,7 +66,7 @@ os_stack_t stack1[TASK1_STACK_SIZE];
static volatile int g_task1_loops;
/* Task 2 */
-#define TASK2_PRIO (2)
+#define TASK2_PRIO (9)
#define TASK2_STACK_SIZE OS_STACK_ALIGN(128)
struct os_task task2;
os_stack_t stack2[TASK2_STACK_SIZE];
@@ -395,8 +395,6 @@ main(int argc, char **argv)
shell_task_init(SHELL_TASK_PRIO, shell_stack, SHELL_TASK_STACK_SIZE,
SHELL_MAX_INPUT_LEN);
- (void) console_init(shell_console_rx_cb);
-
nmgr_task_init(NEWTMGR_TASK_PRIO, newtmgr_stack, NEWTMGR_TASK_STACK_SIZE);
imgmgr_module_init();
bootutil_cfg_register();
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/b65435f3/libs/shell/src/shell.c
----------------------------------------------------------------------
diff --git a/libs/shell/src/shell.c b/libs/shell/src/shell.c
index 95ddcb0..4b95a2b 100644
--- a/libs/shell/src/shell.c
+++ b/libs/shell/src/shell.c
@@ -454,6 +454,7 @@ 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);