ads1115 only
Fork of mbed by
Diff: TARGET_LPC1114/TARGET_NXP/TARGET_LPC11XX_11CXX/gpio_object.h
- Revision:
- 86:04dd9b1680ae
- Parent:
- 82:6473597d706e
- Child:
- 93:e188a91d3eaa
--- a/TARGET_LPC1114/TARGET_NXP/TARGET_LPC11XX_11CXX/gpio_object.h Wed Jun 11 15:14:05 2014 +0100 +++ b/TARGET_LPC1114/TARGET_NXP/TARGET_LPC11XX_11CXX/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 @@ -28,6 +30,7 @@ } gpio_t; static inline void gpio_write(gpio_t *obj, int value) { + MBED_ASSERT(obj->pin != (PinName)NC); uint32_t pin_number = ((obj->pin & 0x0F00) >> 8); if (value) *obj->reg_write |= (1 << pin_number); @@ -36,6 +39,7 @@ } static inline int gpio_read(gpio_t *obj) { + MBED_ASSERT(obj->pin != (PinName)NC); return ((*obj->reg_mask_read) ? 1 : 0); }