mbed library sources modified for open wear

Dependents:   openwear-lifelogger-example

Fork of mbed-src by mbed official

Revision:
309:1576dac518fb
Parent:
307:b1463675c899
--- a/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/i2c_api.c	Thu Sep 04 21:18:39 2014 +0000
+++ b/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/i2c_api.c	Mon Sep 08 23:16:31 2014 +0000
@@ -86,6 +86,18 @@
     obj->i2c->EVENTS_ERROR = 0;
     obj->i2c->ENABLE       = TWI_ENABLE_ENABLE_Disabled << TWI_ENABLE_ENABLE_Pos;
     obj->i2c->POWER        = 0;
+    NRF_GPIO->PIN_CNF[obj->scl] = (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos)
+                                  | (GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos)
+                                  | (GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos)
+                                  | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos)
+                                  | (GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos);
+    NRF_GPIO->PIN_CNF[obj->sda] = (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos)
+                                  | (GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos)
+                                  | (GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos)
+                                  | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos)
+                                  | (GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos);
+    NRF_GPIO->OUTCLR = (1UL << obj->scl);
+    NRF_GPIO->OUTSET = (1UL << obj->sda);
     for (int i = 0; i<100; i++) {
     }