mbed

Fork of mbed-dev by mbed official

Revision:
160:d5399cc887bb
Parent:
158:b23ee177fd68
Child:
162:e13f6fdb2ac4
diff -r 612c381a210f -r d5399cc887bb targets/TARGET_STM/i2c_api.c
--- a/targets/TARGET_STM/i2c_api.c	Tue Feb 28 17:13:35 2017 +0000
+++ b/targets/TARGET_STM/i2c_api.c	Tue Mar 14 16:40:56 2017 +0000
@@ -31,7 +31,7 @@
 
 #include "mbed_assert.h"
 #include "i2c_api.h"
-#include "platform/wait_api.h"
+#include "platform/mbed_wait_api.h"
 
 #if DEVICE_I2C
 
@@ -276,8 +276,8 @@
         // Configure I2C pins
         pinmap_pinout(sda, PinMap_I2C_SDA);
         pinmap_pinout(scl, PinMap_I2C_SCL);
-        pin_mode(sda, PullUp);
-        pin_mode(scl, PullUp);
+        pin_mode(sda, OpenDrainPullUp);
+        pin_mode(scl, OpenDrainPullUp);
         obj_s->event_i2cIRQ = I2C1_EV_IRQn;
         obj_s->error_i2cIRQ = I2C1_ER_IRQn;
     }
@@ -290,8 +290,8 @@
         // Configure I2C pins
         pinmap_pinout(sda, PinMap_I2C_SDA);
         pinmap_pinout(scl, PinMap_I2C_SCL);
-        pin_mode(sda, PullUp);
-        pin_mode(scl, PullUp);
+        pin_mode(sda, OpenDrainPullUp);
+        pin_mode(scl, OpenDrainPullUp);
         obj_s->event_i2cIRQ = I2C2_EV_IRQn;
         obj_s->error_i2cIRQ = I2C2_ER_IRQn;
     }
@@ -304,8 +304,8 @@
         // Configure I2C pins
         pinmap_pinout(sda, PinMap_I2C_SDA);
         pinmap_pinout(scl, PinMap_I2C_SCL);
-        pin_mode(sda, PullUp);
-        pin_mode(scl, PullUp);
+        pin_mode(sda, OpenDrainPullUp);
+        pin_mode(scl, OpenDrainPullUp);
         obj_s->event_i2cIRQ = I2C3_EV_IRQn;
         obj_s->error_i2cIRQ = I2C3_ER_IRQn;
     }
@@ -318,8 +318,8 @@
         // Configure I2C pins
         pinmap_pinout(sda, PinMap_I2C_SDA);
         pinmap_pinout(scl, PinMap_I2C_SCL);
-        pin_mode(sda, PullUp);
-        pin_mode(scl, PullUp);
+        pin_mode(sda, OpenDrainPullUp);
+        pin_mode(scl, OpenDrainPullUp);
         obj_s->event_i2cIRQ = I2C4_EV_IRQn;
         obj_s->error_i2cIRQ = I2C4_ER_IRQn;
     }
@@ -332,8 +332,8 @@
         // Configure I2C pins
         pinmap_pinout(sda, PinMap_I2C_SDA);
         pinmap_pinout(scl, PinMap_I2C_SCL);
-        pin_mode(sda, PullUp);
-        pin_mode(scl, PullUp);
+        pin_mode(sda, OpenDrainPullUp);
+        pin_mode(scl, OpenDrainPullUp);
         obj_s->event_i2cIRQ = FMPI2C1_EV_IRQn;
         obj_s->error_i2cIRQ = FMPI2C1_ER_IRQn;
     }