ads1115 only
Fork of mbed by
Diff: TARGET_KL46Z/TARGET_Freescale/TARGET_KLXX/gpio_object.h
- Revision:
- 86:04dd9b1680ae
- Parent:
- 82:6473597d706e
- Child:
- 93:e188a91d3eaa
--- a/TARGET_KL46Z/TARGET_Freescale/TARGET_KLXX/gpio_object.h Wed Jun 11 15:14:05 2014 +0100 +++ b/TARGET_KL46Z/TARGET_Freescale/TARGET_KLXX/gpio_object.h Wed Jul 02 13:22:23 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); }