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 2017/03/06 21:18:06 UTC

[1/3] incubator-mynewt-blinky git commit: blinky; main() is now running in the context of main app.

Repository: incubator-mynewt-blinky
Updated Branches:
  refs/heads/master b6918edc1 -> 0392bcbdf


blinky; main() is now running in the context of main app.


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

Branch: refs/heads/master
Commit: a69b409197a845bc75748af564cb08c4ec7701d4
Parents: b6918ed
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Wed Jan 25 16:03:38 2017 -0800
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Wed Jan 25 16:03:38 2017 -0800

----------------------------------------------------------------------
 apps/blinky/src/main.c | 70 +++++++++------------------------------------
 1 file changed, 13 insertions(+), 57 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-blinky/blob/a69b4091/apps/blinky/src/main.c
----------------------------------------------------------------------
diff --git a/apps/blinky/src/main.c b/apps/blinky/src/main.c
index f822f87..896a448 100755
--- a/apps/blinky/src/main.c
+++ b/apps/blinky/src/main.c
@@ -28,68 +28,16 @@
 #include "mcu/mcu_sim.h"
 #endif
 
-/* Init all tasks */
-volatile int tasks_initialized;
-int init_tasks(void);
-
-/* Task 1 */
-#define BLINKY_TASK_PRIO (1)
-#define BLINKY_STACK_SIZE    OS_STACK_ALIGN(256)
-
-struct os_task blinky_task;
-os_stack_t blinky_stack[BLINKY_STACK_SIZE];
 static volatile int g_task1_loops;
 
 /* For LED toggling */
 int g_led_pin;
 
-void
-blinky_task_handler(void *arg)
-{
-    struct os_task *t;
-
-    g_led_pin = LED_BLINK_PIN;
-    hal_gpio_init_out(g_led_pin, 1);
-
-    while (1) {
-        t = os_sched_get_current_task();
-        assert(t->t_func == blinky_task_handler);
-
-        ++g_task1_loops;
-
-        /* Wait one second */
-        os_time_delay(OS_TICKS_PER_SEC);
-
-        /* Toggle the LED */
-        hal_gpio_toggle(g_led_pin);
-    }
-}
-
-/**
- * init_tasks
- *
- * Called by main.c after os_init(). This function performs initializations
- * that are required before tasks are running.
- *
- * @return int 0 success; error otherwise.
- */
-int
-init_tasks(void)
-{
-    os_task_init(&blinky_task, "blinky", blinky_task_handler, NULL,
-            BLINKY_TASK_PRIO, OS_WAIT_FOREVER, blinky_stack, BLINKY_STACK_SIZE);
-
-    tasks_initialized = 1;
-
-    return 0;
-}
-
 /**
  * main
  *
- * The main function for the project. This function initializes the os, calls
- * init_tasks to initialize tasks (and possibly other objects), then starts the
- * OS. We should not return from os start.
+ * The main task for the project. This function initializes packages,
+ * and then blinks the BSP LED in a loop.
  *
  * @return int NOTE: this function should never return!
  */
@@ -104,10 +52,18 @@ main(int argc, char **argv)
 
     sysinit();
 
-    rc = init_tasks();
-    os_start();
+    g_led_pin = LED_BLINK_PIN;
+    hal_gpio_init_out(g_led_pin, 1);
+
+    while (1) {
+        ++g_task1_loops;
+
+        /* Wait one second */
+        os_time_delay(OS_TICKS_PER_SEC);
 
-    /* os start should never return. If it does, this should be an error */
+        /* Toggle the LED */
+        hal_gpio_toggle(g_led_pin);
+    }
     assert(0);
 
     return rc;


[2/3] incubator-mynewt-blinky git commit: NOTICE; update copyright years to include 2017.

Posted by ma...@apache.org.
NOTICE; update copyright years to include 2017.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-blinky/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-blinky/commit/5436b504
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-blinky/tree/5436b504
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-blinky/diff/5436b504

Branch: refs/heads/master
Commit: 5436b50431fd3efc3cf2747d31b9197e7074496a
Parents: a69b409
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Tue Feb 7 12:01:21 2017 -0800
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Tue Feb 7 12:01:21 2017 -0800

----------------------------------------------------------------------
 NOTICE | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-blinky/blob/5436b504/NOTICE
----------------------------------------------------------------------
diff --git a/NOTICE b/NOTICE
index 94bea73..8648ba9 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,5 +1,5 @@
 Apache Mynewt (incubating)
-Copyright 2015-2016 The Apache Software Foundation
+Copyright 2015-2017 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).


[3/3] incubator-mynewt-blinky git commit: MYNEWT-645 Blinky - Use latest compatible core.

Posted by ma...@apache.org.
MYNEWT-645 Blinky - Use latest compatible core.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-blinky/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-blinky/commit/0392bcbd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-blinky/tree/0392bcbd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-blinky/diff/0392bcbd

Branch: refs/heads/master
Commit: 0392bcbdf696304765973183000cf4b1e1c852ab
Parents: 5436b50
Author: Christopher Collins <cc...@apache.org>
Authored: Tue Feb 28 11:38:12 2017 -0800
Committer: Christopher Collins <cc...@apache.org>
Committed: Tue Feb 28 11:38:12 2017 -0800

----------------------------------------------------------------------
 project.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-blinky/blob/0392bcbd/project.yml
----------------------------------------------------------------------
diff --git a/project.yml b/project.yml
index 7758507..357b5ea 100644
--- a/project.yml
+++ b/project.yml
@@ -27,6 +27,6 @@ project.repositories:
 #
 repository.apache-mynewt-core:
     type: github
-    vers: 0-latest
+    vers: 1-latest
     user: apache
     repo: incubator-mynewt-core