mbed library sources

Dependents:   Marvino mbot

Fork of mbed-src by mbed official

Revision:
227:7bd0639b8911
Parent:
41:e8b66477f5bf
Child:
530:2939f5396008
--- a/targets/hal/TARGET_NXP/TARGET_LPC176X/can_api.c	Wed Jun 11 09:45:09 2014 +0100
+++ b/targets/hal/TARGET_NXP/TARGET_LPC176X/can_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 "can_api.h"
 
 #include "cmsis.h"
 #include "pinmap.h"
-#include "error.h"
 
 #include <math.h>
 #include <string.h>
@@ -258,9 +258,7 @@
     CANName can_rd = (CANName)pinmap_peripheral(rd, PinMap_CAN_RD);
     CANName can_td = (CANName)pinmap_peripheral(td, PinMap_CAN_TD);
     obj->dev = (LPC_CAN_TypeDef *)pinmap_merge(can_rd, can_td);
-    if ((int)obj->dev == NC) {
-        error("CAN pin mapping failed");
-    }
+    MBED_ASSERT((int)obj->dev != NC);
 
     switch ((int)obj->dev) {
         case CAN_1: LPC_SC->PCONP |= 1 << 13; break;