mbed library sources for GR-PEACH rev.B.
Fork of mbed-src by
Diff: targets/hal/TARGET_NXP/TARGET_LPC176X/gpio_object.h
- Revision:
- 227:7bd0639b8911
- Parent:
- 13:0645d8841f51
- Child:
- 455:8bc3a354916d
--- a/targets/hal/TARGET_NXP/TARGET_LPC176X/gpio_object.h Wed Jun 11 09:45:09 2014 +0100 +++ b/targets/hal/TARGET_NXP/TARGET_LPC176X/gpio_object.h Wed Jun 11 16:00:09 2014 +0100 @@ -16,6 +16,8 @@ #ifndef MBED_GPIO_OBJECT_H #define MBED_GPIO_OBJECT_H +#include "mbed_assert.h" + #ifdef __cplusplus extern "C" { #endif @@ -31,6 +33,7 @@ } gpio_t; static inline void gpio_write(gpio_t *obj, int value) { + MBED_ASSERT(obj->pin != (PinName)NC); if (value) *obj->reg_set = obj->mask; else @@ -38,6 +41,7 @@ } static inline int gpio_read(gpio_t *obj) { + MBED_ASSERT(obj->pin != (PinName)NC); return ((*obj->reg_in & obj->mask) ? 1 : 0); }