mbed library sources
Dependents: frdm_kl05z_gpio_test
Fork of mbed-src by
Diff: targets/hal/TARGET_NXP/TARGET_LPC23XX/i2c_api.c
- Revision:
- 227:7bd0639b8911
- Parent:
- 13:0645d8841f51
--- a/targets/hal/TARGET_NXP/TARGET_LPC23XX/i2c_api.c Wed Jun 11 09:45:09 2014 +0100 +++ b/targets/hal/TARGET_NXP/TARGET_LPC23XX/i2c_api.c Wed Jun 11 16:00:09 2014 +0100 @@ -16,7 +16,6 @@ #include "i2c_api.h" #include "cmsis.h" #include "pinmap.h" -#include "error.h" static const PinMap PinMap_I2C_SDA[] = { {P0_0 , I2C_1, 3}, @@ -96,10 +95,7 @@ I2CName i2c_sda = (I2CName)pinmap_peripheral(sda, PinMap_I2C_SDA); I2CName i2c_scl = (I2CName)pinmap_peripheral(scl, PinMap_I2C_SCL); obj->i2c = (LPC_I2C_TypeDef *)pinmap_merge(i2c_sda, i2c_scl); - - if ((int)obj->i2c == NC) { - error("I2C pin mapping failed"); - } + MBED_ASSERT((int)obj->i2c != NC); // enable power i2c_power_enable(obj);