Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: Encrypted my_mbed lklk CyaSSL_DTLS_Cellular ... more
Diff: targets/hal/TARGET_NXP/TARGET_LPC15XX/gpio_object.h
- Revision:
- 227:7bd0639b8911
- Parent:
- 103:9b881da47c92
- Child:
- 455:8bc3a354916d
--- a/targets/hal/TARGET_NXP/TARGET_LPC15XX/gpio_object.h Wed Jun 11 09:45:09 2014 +0100
+++ b/targets/hal/TARGET_NXP/TARGET_LPC15XX/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
@@ -31,6 +33,8 @@
} 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 +42,7 @@
}
static inline int gpio_read(gpio_t *obj) {
+ MBED_ASSERT(obj->pin != (PinName)NC);
return ((*obj->reg_in & obj->mask) ? 1 : 0);
}

