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: EEPROMWrite Full-Project
Fork of mbed-src by
Diff: api/DigitalIn.h
- 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()
*/
