mbed library sources
Dependents: frdm_kl05z_gpio_test
Fork of mbed-src by
Diff: targets/hal/TARGET_NXP/TARGET_LPC11XX_11CXX/i2c_api.c
- Revision:
- 227:7bd0639b8911
- Parent:
- 30:91c1d09ada54
- Child:
- 250:a49055e7a707
--- a/targets/hal/TARGET_NXP/TARGET_LPC11XX_11CXX/i2c_api.c Wed Jun 11 09:45:09 2014 +0100 +++ b/targets/hal/TARGET_NXP/TARGET_LPC11XX_11CXX/i2c_api.c Wed Jun 11 16:00:09 2014 +0100 @@ -13,6 +13,7 @@ * 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" @@ -87,10 +88,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);