The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.
Dependents: hello SerialTestv11 SerialTestv12 Sierpinski ... more
mbed 2
This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.
Diff: DigitalOut.h
- Revision:
- 93:e188a91d3eaa
- Parent:
- 85:024bf7f99721
- Child:
- 122:f9eeca106725
diff -r 4fc01daae5a5 -r e188a91d3eaa DigitalOut.h --- a/DigitalOut.h Thu Nov 27 13:33:22 2014 +0000 +++ b/DigitalOut.h Tue Feb 03 15:31:20 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() */