mbed(SerialHalfDuplex入り)

Fork of mbed by mbed official

Revision:
93:e188a91d3eaa
Parent:
85:024bf7f99721
--- a/DigitalInOut.h	Thu Nov 27 13:33:22 2014 +0000
+++ b/DigitalInOut.h	Tue Feb 03 15:31:20 2015 +0000
@@ -85,6 +85,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
     /** A shorthand for write()
      */