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/02/09 02:14:25 UTC
[2/2] incubator-mynewt-larva git commit: Update projects to use new
shell init interface.
Update projects to use new shell init interface.
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/7ffc25f9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/tree/7ffc25f9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/diff/7ffc25f9
Branch: refs/heads/master
Commit: 7ffc25f9f19dbfb7f74dc0a112f84e83c4759aff
Parents: 5bf786a
Author: Christopher Collins <cc...@gmail.com>
Authored: Mon Feb 8 17:10:47 2016 -0800
Committer: Christopher Collins <cc...@gmail.com>
Committed: Mon Feb 8 17:10:47 2016 -0800
----------------------------------------------------------------------
project/bleshell/src/main.c | 4 +++-
project/bletest/src/main.c | 6 +++++-
project/bletiny/src/main.c | 8 +++++---
project/blinky/src/main.c | 4 +++-
project/luatest/src/main.c | 4 +++-
project/slinky/src/main.c | 4 +++-
6 files changed, 22 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/7ffc25f9/project/bleshell/src/main.c
----------------------------------------------------------------------
diff --git a/project/bleshell/src/main.c b/project/bleshell/src/main.c
index 1bb6f03..0f15f5a 100755
--- a/project/bleshell/src/main.c
+++ b/project/bleshell/src/main.c
@@ -47,6 +47,7 @@
#define HOST_TASK_PRIO (1)
#define SHELL_TASK_PRIO (3)
+#define SHELL_MAX_INPUT_LEN (1024)
#define SHELL_TASK_STACK_SIZE (OS_STACK_ALIGN(384))
static bssnz_t os_stack_t shell_stack[SHELL_TASK_STACK_SIZE];
@@ -1322,7 +1323,8 @@ main(void)
/* Initialize the BLE LL */
ble_ll_init();
- rc = shell_task_init(SHELL_TASK_PRIO, shell_stack, SHELL_TASK_STACK_SIZE);
+ rc = shell_task_init(SHELL_TASK_PRIO, shell_stack, SHELL_TASK_STACK_SIZE,
+ SHELL_MAX_INPUT_LEN);
assert(rc == 0);
/* Init the console */
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/7ffc25f9/project/bletest/src/main.c
----------------------------------------------------------------------
diff --git a/project/bletest/src/main.c b/project/bletest/src/main.c
index 2acb903..7970f77 100755
--- a/project/bletest/src/main.c
+++ b/project/bletest/src/main.c
@@ -63,6 +63,9 @@ os_stack_t newtmgr_stack[NEWTMGR_TASK_STACK_SIZE];
/* Flash file system sector size */
#define NFFS_AREA_MAX (8)
+/* Shell maximum input line length */
+#define SHELL_MAX_INPUT_LEN (256)
+
/* For LED toggling */
int g_led_pin;
@@ -892,7 +895,8 @@ main(void)
assert(rc == 0);
}
- shell_task_init(SHELL_TASK_PRIO, shell_stack, SHELL_TASK_STACK_SIZE);
+ shell_task_init(SHELL_TASK_PRIO, shell_stack, SHELL_TASK_STACK_SIZE,
+ SHELL_MAX_INPUT_LEN);
nmgr_task_init(NEWTMGR_TASK_PRIO, newtmgr_stack, NEWTMGR_TASK_STACK_SIZE);
imgmgr_module_init();
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/7ffc25f9/project/bletiny/src/main.c
----------------------------------------------------------------------
diff --git a/project/bletiny/src/main.c b/project/bletiny/src/main.c
index b822095..1a8ad4d 100755
--- a/project/bletiny/src/main.c
+++ b/project/bletiny/src/main.c
@@ -47,7 +47,8 @@
#define HOST_TASK_PRIO (1)
#define SHELL_TASK_PRIO (3)
-#define SHELL_TASK_STACK_SIZE (OS_STACK_ALIGN(128))
+#define SHELL_MAX_INPUT_LEN (256)
+#define SHELL_TASK_STACK_SIZE (OS_STACK_ALIGN(96))
static bssnz_t os_stack_t shell_stack[SHELL_TASK_STACK_SIZE];
static struct os_mutex bletiny_mutex;
@@ -79,7 +80,7 @@ struct os_mbuf_pool default_mbuf_pool;
struct os_mempool default_mbuf_mpool;
/* BLETINY variables */
-#define BLETINY_STACK_SIZE (96)
+#define BLETINY_STACK_SIZE (OS_STACK_ALIGN(128))
#define BLETINY_TASK_PRIO (HOST_TASK_PRIO + 1)
#define BLETINY_MAX_SVCS 1
@@ -1331,7 +1332,8 @@ main(void)
/* Initialize the BLE LL */
ble_ll_init();
- rc = shell_task_init(SHELL_TASK_PRIO, shell_stack, SHELL_TASK_STACK_SIZE);
+ rc = shell_task_init(SHELL_TASK_PRIO, shell_stack, SHELL_TASK_STACK_SIZE,
+ SHELL_MAX_INPUT_LEN);
assert(rc == 0);
/* Init the console */
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/7ffc25f9/project/blinky/src/main.c
----------------------------------------------------------------------
diff --git a/project/blinky/src/main.c b/project/blinky/src/main.c
index ba13490..e2d7481 100755
--- a/project/blinky/src/main.c
+++ b/project/blinky/src/main.c
@@ -48,6 +48,7 @@ struct os_task task2;
os_stack_t stack2[TASK2_STACK_SIZE];
#define SHELL_TASK_PRIO (3)
+#define SHELL_MAX_INPUT_LEN (256)
#define SHELL_TASK_STACK_SIZE (OS_STACK_ALIGN(1024))
os_stack_t shell_stack[SHELL_TASK_STACK_SIZE];
@@ -181,7 +182,8 @@ main(int argc, char **argv)
rc = os_msys_register(&default_mbuf_pool);
assert(rc == 0);
- shell_task_init(SHELL_TASK_PRIO, shell_stack, SHELL_TASK_STACK_SIZE);
+ shell_task_init(SHELL_TASK_PRIO, shell_stack, SHELL_TASK_STACK_SIZE,
+ SHELL_MAX_INPUT_LEN);
(void) console_init(shell_console_rx_cb);
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/7ffc25f9/project/luatest/src/main.c
----------------------------------------------------------------------
diff --git a/project/luatest/src/main.c b/project/luatest/src/main.c
index 7067e54..c1749d0 100755
--- a/project/luatest/src/main.c
+++ b/project/luatest/src/main.c
@@ -36,6 +36,7 @@ int init_tasks(void);
/* Shell */
#define SHELL_TASK_PRIO (8)
+#define SHELL_MAX_INPUT_LEN (256)
#define SHELL_TASK_STACK_SIZE (OS_STACK_ALIGN(2048))
static os_stack_t shell_stack[SHELL_TASK_STACK_SIZE];
@@ -87,7 +88,8 @@ main(int argc, char **argv)
os_init();
/* Init tasks */
- shell_task_init(SHELL_TASK_PRIO, shell_stack, SHELL_TASK_STACK_SIZE);
+ 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-larva/blob/7ffc25f9/project/slinky/src/main.c
----------------------------------------------------------------------
diff --git a/project/slinky/src/main.c b/project/slinky/src/main.c
index ce10969..7e08d2f 100755
--- a/project/slinky/src/main.c
+++ b/project/slinky/src/main.c
@@ -56,6 +56,7 @@ struct os_task task2;
os_stack_t stack2[TASK2_STACK_SIZE];
#define SHELL_TASK_PRIO (3)
+#define SHELL_MAX_INPUT_LEN (256)
#define SHELL_TASK_STACK_SIZE (OS_STACK_ALIGN(1024))
os_stack_t shell_stack[SHELL_TASK_STACK_SIZE];
@@ -265,7 +266,8 @@ main(int argc, char **argv)
assert(rc == 0);
}
- shell_task_init(SHELL_TASK_PRIO, shell_stack, SHELL_TASK_STACK_SIZE);
+ shell_task_init(SHELL_TASK_PRIO, shell_stack, SHELL_TASK_STACK_SIZE,
+ SHELL_MAX_INPUT_LEN);
(void) console_init(shell_console_rx_cb);