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:
455:8bc3a354916d
Parent:
212:34d62c0b2af6
--- a/api/DigitalIn.h	Tue Jan 27 07:15:07 2015 +0000
+++ b/api/DigitalIn.h	Tue Jan 27 13:30:08 2015 +0000
@@ -80,6 +80,16 @@
         gpio_mode(&gpio, pull);
     }
 
+    /** Return the output setting, represented as 0 or 1 (int)
+     *
+     *  @returns
+     *    Non zero value if pin is connected to uc GPIO
+     *    0 if gpio object was initialized with NC
+     */
+    int is_connected() {
+        return gpio_is_connected(&gpio);
+    }
+
 #ifdef MBED_OPERATORS
     /** An operator shorthand for read()
      */