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/07/27 00:42:03 UTC
incubator-mynewt-core git commit: slinky;
move first console printout to happen in task context. UART tx
completion interrupt handler was overwriting initial system stack.
Repository: incubator-mynewt-core
Updated Branches:
refs/heads/develop 7e47b2db6 -> ec4e8cf9b
slinky; move first console printout to happen in task context.
UART tx completion interrupt handler was overwriting initial
system stack.
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/ec4e8cf9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/ec4e8cf9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/ec4e8cf9
Branch: refs/heads/develop
Commit: ec4e8cf9bc980d4ecf4922436d7fc1884960ba00
Parents: 7e47b2d
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Tue Jul 26 17:23:44 2016 -0700
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Tue Jul 26 17:25:54 2016 -0700
----------------------------------------------------------------------
apps/slinky/src/main.c | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/ec4e8cf9/apps/slinky/src/main.c
----------------------------------------------------------------------
diff --git a/apps/slinky/src/main.c b/apps/slinky/src/main.c
index 16cb3ac..f7e11bc 100755
--- a/apps/slinky/src/main.c
+++ b/apps/slinky/src/main.c
@@ -199,11 +199,20 @@ task1_handler(void *arg)
{
struct os_task *t;
int prev_pin_state, curr_pin_state;
+ struct image_version ver;
/* Set the led pin for the E407 devboard */
g_led_pin = LED_BLINK_PIN;
hal_gpio_init_out(g_led_pin, 1);
+ if (imgr_my_version(&ver) == 0) {
+ console_printf("\nSlinky %u.%u.%u.%u\n",
+ ver.iv_major, ver.iv_minor, ver.iv_revision,
+ (unsigned int)ver.iv_build_num);
+ } else {
+ console_printf("\nSlinky\n");
+ }
+
while (1) {
t = os_sched_get_current_task();
assert(t->t_func == task1_handler);
@@ -337,7 +346,6 @@ int
main(int argc, char **argv)
{
int rc;
- struct image_version ver;
#ifdef ARCH_sim
mcu_sim_parse_args(argc, argv);
@@ -404,15 +412,6 @@ main(int argc, char **argv)
rc = init_tasks();
- rc = imgr_my_version(&ver);
- if (rc == 0) {
- console_printf("\nSlinky %u.%u.%u.%u\n",
- ver.iv_major, ver.iv_minor, ver.iv_revision,
- (unsigned int)ver.iv_build_num);
- } else {
- console_printf("\nSlinky\n");
- }
-
os_start();
/* os start should never return. If it does, this should be an error */