mbed library sources modified for open wear

Dependents:   openwear-lifelogger-example

Fork of mbed-src by mbed official

Revision:
227:7bd0639b8911
Parent:
182:242346c42295
--- a/targets/hal/TARGET_Freescale/TARGET_K20D5M/i2c_api.c	Wed Jun 11 09:45:09 2014 +0100
+++ b/targets/hal/TARGET_Freescale/TARGET_K20D5M/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"
 
 static const PinMap PinMap_I2C_SDA[] = {
@@ -54,8 +54,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);
 
     SIM->SCGC4 |= SIM_SCGC4_I2C0_MASK;
     SIM->SCGC5 |= SIM_SCGC5_PORTB_MASK;