mbed library sources modify the rtc/i2c
Dependents: SSD1306_smart_watch
Fork of mbed-src by
Diff: api/DigitalOut.h
- Revision:
- 455:8bc3a354916d
- Parent:
- 212:34d62c0b2af6
diff -r a07e52520545 -r 8bc3a354916d api/DigitalOut.h --- a/api/DigitalOut.h Tue Jan 27 07:15:07 2015 +0000 +++ b/api/DigitalOut.h Tue Jan 27 13:30:08 2015 +0000 @@ -77,6 +77,16 @@ return gpio_read(&gpio); } + /** 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() */