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/03/19 02:10:40 UTC
[05/13] incubator-mynewt-core git commit: added a simulated LED blink
for blinky native
added a simulated LED blink for blinky native
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/895e92f7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/895e92f7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/895e92f7
Branch: refs/heads/master
Commit: 895e92f7c002024f980a64684c693ab58e1ba3bd
Parents: 9eb699d
Author: Paul Dietrich <pa...@yahoo.com>
Authored: Fri Mar 11 15:41:07 2016 -0800
Committer: Paul Dietrich <pa...@yahoo.com>
Committed: Fri Mar 11 15:41:21 2016 -0800
----------------------------------------------------------------------
hw/mcu/native/src/hal_gpio.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/895e92f7/hw/mcu/native/src/hal_gpio.c
----------------------------------------------------------------------
diff --git a/hw/mcu/native/src/hal_gpio.c b/hw/mcu/native/src/hal_gpio.c
index 7ab2d0f..677b738 100644
--- a/hw/mcu/native/src/hal_gpio.c
+++ b/hw/mcu/native/src/hal_gpio.c
@@ -56,7 +56,7 @@ hal_gpio_init_out(int pin, int val)
return -1;
}
hal_gpio[pin].dir = OUTPUT;
- hal_gpio[pin].val = (val != 0);
+ hal_gpio_write(pin,val);
return 0;
}
@@ -81,6 +81,8 @@ void hal_gpio_write(int pin, int val)
return;
}
hal_gpio[pin].val = (val != 0);
+ printf("hal_gpio set pin %2d to %1d\r", pin, hal_gpio[pin].val);
+ fflush(stdout);
}
int