mbed library sources

Dependents:   Encrypted my_mbed lklk CyaSSL_DTLS_Cellular ... more

Superseded

This library was superseded by mbed-dev - https://os.mbed.com/users/mbed_official/code/mbed-dev/.

Development branch of the mbed library sources. This library is kept in synch with the latest changes from the mbed SDK and it is not guaranteed to work.

If you are looking for a stable and tested release, please import one of the official mbed library releases:

Import librarymbed

The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Revision:
239:8cadf13dff33
Parent:
219:993c9b0acbcc
Child:
392:2b59412bb664
--- a/targets/hal/TARGET_STM/TARGET_NUCLEO_F072RB/gpio_object.h	Thu Jun 26 09:00:08 2014 +0100
+++ b/targets/hal/TARGET_STM/TARGET_NUCLEO_F072RB/gpio_object.h	Thu Jun 26 09:15:07 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;
     } else {
@@ -56,6 +58,7 @@
 }
 
 static inline int gpio_read(gpio_t *obj) {
+    MBED_ASSERT(obj->pin != (PinName)NC);
     return ((*obj->reg_in & obj->mask) ? 1 : 0);
 }