mbed library sources
Dependents: frdm_kl05z_gpio_test
Fork of mbed-src by
Diff: targets/hal/TARGET_STM/TARGET_DISCO_F407VG/gpio_object.h
- Revision:
- 227:7bd0639b8911
- Parent:
- 133:d4dda5c437f0
- Child:
- 242:7074e42da0b2
diff -r b062af740e40 -r 7bd0639b8911 targets/hal/TARGET_STM/TARGET_DISCO_F407VG/gpio_object.h --- a/targets/hal/TARGET_STM/TARGET_DISCO_F407VG/gpio_object.h Wed Jun 11 09:45:09 2014 +0100 +++ b/targets/hal/TARGET_STM/TARGET_DISCO_F407VG/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); }