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/10/13 04:42:17 UTC

incubator-mynewt-core git commit: stm32f4 hal gpio; hal_gpio_init_out() value was not put into action.

Repository: incubator-mynewt-core
Updated Branches:
  refs/heads/develop 00d3fe110 -> adbb00e93


stm32f4 hal gpio; hal_gpio_init_out() value was not put into action.


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

Branch: refs/heads/develop
Commit: adbb00e9383becee8de74e347b617d234543a509
Parents: 00d3fe1
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Wed Oct 12 21:41:46 2016 -0700
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Wed Oct 12 21:41:46 2016 -0700

----------------------------------------------------------------------
 hw/mcu/stm/stm32f4xx/src/hal_gpio.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/adbb00e9/hw/mcu/stm/stm32f4xx/src/hal_gpio.c
----------------------------------------------------------------------
diff --git a/hw/mcu/stm/stm32f4xx/src/hal_gpio.c b/hw/mcu/stm/stm32f4xx/src/hal_gpio.c
index 696d569..9b19040 100644
--- a/hw/mcu/stm/stm32f4xx/src/hal_gpio.c
+++ b/hw/mcu/stm/stm32f4xx/src/hal_gpio.c
@@ -470,7 +470,11 @@ int hal_gpio_init_out(int pin, int val)
     init_cfg.Alternate = 0;
 
     rc = hal_gpio_init_stm(pin, &init_cfg);
-    return rc;
+    if (rc) {
+        return rc;
+    }
+    hal_gpio_write(pin, val);
+    return 0;
 }
 
 /**