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_LPC43XX/i2c_api.c
- Revision:
- 318:bad45627264e
- Parent:
- 285:31249416b6f9
diff -r 60d539162fb2 -r bad45627264e targets/hal/TARGET_NXP/TARGET_LPC43XX/i2c_api.c --- a/targets/hal/TARGET_NXP/TARGET_LPC43XX/i2c_api.c Thu Sep 11 16:15:07 2014 +0100 +++ b/targets/hal/TARGET_NXP/TARGET_LPC43XX/i2c_api.c Thu Sep 11 16:30:07 2014 +0100 @@ -101,11 +101,12 @@ i2c_conclr(obj, 1, 1, 1, 1); i2c_interface_enable(obj); - // If pins are not dedicated, set SCU functions - if (sda != P_DED) { + // Set SCU functions + if (scl == P_DED) { + // Enable dedicated I2C0 SDA and SCL pins (open drain) + LPC_SCU->SFSI2C0 = (1 << 11) | (1 << 3); + } else { pinmap_pinout(sda, PinMap_I2C_SDA); - } - if (scl != P_DED) { pinmap_pinout(scl, PinMap_I2C_SCL); } }