mbed library sources
Dependents: frdm_kl05z_gpio_test
Fork of mbed-src by
Diff: targets/hal/TARGET_Freescale/TARGET_KLXX/i2c_api.c
- Revision:
- 227:7bd0639b8911
- Parent:
- 182:242346c42295
--- a/targets/hal/TARGET_Freescale/TARGET_KLXX/i2c_api.c Wed Jun 11 09:45:09 2014 +0100 +++ b/targets/hal/TARGET_Freescale/TARGET_KLXX/i2c_api.c Wed Jun 11 16:00:09 2014 +0100 @@ -13,11 +13,11 @@ * 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" #include "clk_freqs.h" #include "PeripheralPins.h" @@ -43,9 +43,7 @@ I2CName i2c_sda = (I2CName)pinmap_peripheral(sda, PinMap_I2C_SDA); I2CName i2c_scl = (I2CName)pinmap_peripheral(scl, PinMap_I2C_SCL); obj->i2c = (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 switch ((int)obj->i2c) {