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/11/10 22:39:38 UTC

[31/50] [abbrv] incubator-mynewt-core git commit: boot; don't start OS even when boot_serial is not defined.

boot; don't start OS even when boot_serial is not defined.


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

Branch: refs/heads/master
Commit: 0c51338ed56eee51d3c1b76f90db842eae1cac44
Parents: 41e4670
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Tue Nov 8 23:29:14 2016 -0800
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Tue Nov 8 23:29:14 2016 -0800

----------------------------------------------------------------------
 apps/boot/src/boot.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/0c51338e/apps/boot/src/boot.c
----------------------------------------------------------------------
diff --git a/apps/boot/src/boot.c b/apps/boot/src/boot.c
index 43280c1..fbc4b7d 100755
--- a/apps/boot/src/boot.c
+++ b/apps/boot/src/boot.c
@@ -30,6 +30,7 @@
 #if MYNEWT_VAL(BOOT_SERIAL)
 #include <hal/hal_gpio.h>
 #include <boot_serial/boot_serial.h>
+#include <sysinit/sysinit.h>
 #endif
 #include <console/console.h>
 #include "bootutil/image.h"
@@ -39,12 +40,7 @@
 #define AREA_DESC_MAX       (BOOT_AREA_DESC_MAX)
 
 #if MYNEWT_VAL(BOOT_SERIAL)
-#define BOOT_SER_PRIO_TASK          1
-#define BOOT_SER_STACK_SZ           512
 #define BOOT_SER_CONS_INPUT         128
-
-static struct os_task boot_ser_task;
-static os_stack_t boot_ser_stack[BOOT_SER_STACK_SZ];
 #endif
 
 int
@@ -67,10 +63,8 @@ main(void)
      */
     hal_gpio_init_in(BOOT_SERIAL_DETECT_PIN, BOOT_SERIAL_DETECT_PIN_CFG);
     if (hal_gpio_read(BOOT_SERIAL_DETECT_PIN) == BOOT_SERIAL_DETECT_PIN_VAL) {
-        rc = boot_serial_task_init(&boot_ser_task, BOOT_SER_PRIO_TASK,
-          boot_ser_stack, BOOT_SER_STACK_SZ, BOOT_SER_CONS_INPUT);
-        assert(rc == 0);
-        os_start();
+        boot_serial_start(BOOT_SER_CONS_INPUT);
+        assert(0);
     }
 #endif
     rc = boot_go(&rsp);