mbed SDK library sources

Fork of mbed-src by mbed official

Development branch of the mbed library sources. This library is kept in synch with the latest changes from the mbed SDK and it is not guaranteed to work.

If you are looking for a stable and tested release, please import one of the official mbed library releases:

Import librarymbed

The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Revision:
34:a3c7023e45de
Parent:
15:4892fe388435
--- a/targets/hal/TARGET_NXP/TARGET_LPC408X/i2c_api.c	Mon Oct 07 09:15:08 2013 +0100
+++ b/targets/hal/TARGET_NXP/TARGET_LPC408X/i2c_api.c	Fri Oct 11 13:30:08 2013 +0100
@@ -122,6 +122,15 @@
     
     pinmap_pinout(sda, PinMap_I2C_SDA);
     pinmap_pinout(scl, PinMap_I2C_SCL);
+
+    // OpenDrain must explicitly be enabled for p0.0 and p0.1
+    if (sda == P0_0) {
+        pin_mode(sda, OpenDrain);
+    }
+    if (scl == P0_1) {
+        pin_mode(scl, OpenDrain);
+    }
+
 }
 
 inline int i2c_start(i2c_t *obj) {