meh

Fork of mbed by mbed official

Revision:
86:04dd9b1680ae
Parent:
82:6473597d706e
--- a/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K64F/gpio_object.h	Wed Jun 11 15:14:05 2014 +0100
+++ b/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K64F/gpio_object.h	Wed Jul 02 13:22:23 2014 +0100
@@ -16,6 +16,7 @@
 #ifndef MBED_GPIO_OBJECT_H
 #define MBED_GPIO_OBJECT_H
 
+#include "mbed_assert.h"
 #include "fsl_gpio_hal.h"
 
 #ifdef __cplusplus
@@ -27,6 +28,7 @@
 } gpio_t;
 
 static inline void gpio_write(gpio_t *obj, int value) {
+    MBED_ASSERT(obj->pinName != (PinName)NC);
     uint32_t port = obj->pinName >> GPIO_PORT_SHIFT;
     uint32_t pin = obj->pinName & 0xFF;
 
@@ -34,6 +36,7 @@
 }
 
 static inline int gpio_read(gpio_t *obj) {
+    MBED_ASSERT(obj->pinName != (PinName)NC);
     uint32_t port = obj->pinName >> GPIO_PORT_SHIFT;
     uint32_t pin = obj->pinName & 0xFF;