mbed library sources, include can_api for nucleo-f091rc
Dependents: CanNucleoF0_example
Fork of mbed-src by
Diff: targets/hal/TARGET_NXP/TARGET_LPC11XX_11CXX/gpio_object.h
- Revision:
- 227:7bd0639b8911
- Parent:
- 30:91c1d09ada54
- Child:
- 455:8bc3a354916d
--- a/targets/hal/TARGET_NXP/TARGET_LPC11XX_11CXX/gpio_object.h Wed Jun 11 09:45:09 2014 +0100 +++ b/targets/hal/TARGET_NXP/TARGET_LPC11XX_11CXX/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 @@ -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); }