Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-src by
Diff: targets/hal/TARGET_NXP/TARGET_LPC408X/i2c_api.c
- 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) {
