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/04/28 02:14:44 UTC

[45/50] [abbrv] incubator-mynewt-core git commit: nrfxx gpio; gpio_toggle() was not changing the value back to 0.

nrfxx gpio; gpio_toggle() was not changing the value back to 0.


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

Branch: refs/heads/master
Commit: 546cf5e3c0bc0b48590f9aaf3128b9833d8f9948
Parents: 0187902
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Tue Apr 26 12:02:53 2016 -0700
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Tue Apr 26 12:02:53 2016 -0700

----------------------------------------------------------------------
 hw/mcu/nordic/nrf51xxx/src/hal_gpio.c | 2 +-
 hw/mcu/nordic/nrf52xxx/src/hal_gpio.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/546cf5e3/hw/mcu/nordic/nrf51xxx/src/hal_gpio.c
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/nrf51xxx/src/hal_gpio.c b/hw/mcu/nordic/nrf51xxx/src/hal_gpio.c
index 6aac418..bd8414a 100644
--- a/hw/mcu/nordic/nrf51xxx/src/hal_gpio.c
+++ b/hw/mcu/nordic/nrf51xxx/src/hal_gpio.c
@@ -428,7 +428,7 @@ int hal_gpio_read(int pin)
  */
 int hal_gpio_toggle(int pin)
 {
-    int pin_state = (hal_gpio_read(pin) != 1);
+    int pin_state = (hal_gpio_read(pin) == 0);
     hal_gpio_write(pin, pin_state);
     return pin_state;
 }

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/546cf5e3/hw/mcu/nordic/nrf52xxx/src/hal_gpio.c
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/nrf52xxx/src/hal_gpio.c b/hw/mcu/nordic/nrf52xxx/src/hal_gpio.c
index 3619753..d803ec0 100644
--- a/hw/mcu/nordic/nrf52xxx/src/hal_gpio.c
+++ b/hw/mcu/nordic/nrf52xxx/src/hal_gpio.c
@@ -428,7 +428,7 @@ int hal_gpio_read(int pin)
  */
 int hal_gpio_toggle(int pin)
 {
-    int pin_state = (hal_gpio_read(pin) != 1);
+    int pin_state = (hal_gpio_read(pin) == 0);
     hal_gpio_write(pin, pin_state);
     return pin_state;
 }