mbed library sources
Fork of mbed-src by
Diff: targets/hal/TARGET_STM/TARGET_DISCO_F100RB/gpio_object.h
- Revision:
- 227:7bd0639b8911
- Parent:
- 126:549ba18ddd81
- Child:
- 455:8bc3a354916d
--- a/targets/hal/TARGET_STM/TARGET_DISCO_F100RB/gpio_object.h Wed Jun 11 09:45:09 2014 +0100 +++ b/targets/hal/TARGET_STM/TARGET_DISCO_F100RB/gpio_object.h Wed Jun 11 16:00:09 2014 +0100 @@ -30,6 +30,7 @@ #ifndef MBED_GPIO_OBJECT_H #define MBED_GPIO_OBJECT_H +#include "mbed_assert.h" #include "cmsis.h" #include "PortNames.h" #include "PeripheralNames.h" @@ -48,6 +49,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; } @@ -57,6 +59,7 @@ } static inline int gpio_read(gpio_t *obj) { + MBED_ASSERT(obj->pin != (PinName)NC); return ((*obj->reg_in & obj->mask) ? 1 : 0); }