mbed library sources
Dependents: frdm_kl05z_gpio_test
Fork of mbed-src by
Diff: targets/hal/TARGET_NXP/TARGET_LPC11UXX/i2c_api.c
- Revision:
- 227:7bd0639b8911
- Parent:
- 13:0645d8841f51
- Child:
- 274:6937b19af361
--- a/targets/hal/TARGET_NXP/TARGET_LPC11UXX/i2c_api.c Wed Jun 11 09:45:09 2014 +0100 +++ b/targets/hal/TARGET_NXP/TARGET_LPC11UXX/i2c_api.c Wed Jun 11 16:00:09 2014 +0100 @@ -13,10 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +#include "mbed_assert.h" #include "i2c_api.h" #include "cmsis.h" #include "pinmap.h" -#include "error.h" static const PinMap PinMap_I2C_SDA[] = { {P0_5, I2C_0, 1}, @@ -87,10 +87,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_Type *)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);