mbed library sources
Dependents: frdm_kl05z_gpio_test
Fork of mbed-src by
Diff: targets/hal/TARGET_NXP/TARGET_LPC408X/i2c_api.c
- Revision:
- 34:a3c7023e45de
- Parent:
- 15:4892fe388435
- Child:
- 227:7bd0639b8911
--- 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) {