DigitalInOut Hello World

Fork of DigitalInOut_HelloWorld_Mbed by Mbed

Use

The DigitalInOut API can be used to both read and write a digital pin. Use the output() and input() function calls to switch modes and then use just like you would DigitalIn or DigitalOut.

API

API reference.

Import librarymbed

No documentation found.
Revision:
0:0d0417932681
Child:
3:e4004b2e39ad
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Feb 13 16:11:53 2013 +0000
@@ -0,0 +1,11 @@
+#include "mbed.h"
+ 
+DigitalInOut pin(p5);
+ 
+int main() {
+    pin.output();
+    pin = 0;     
+    wait_us(500);
+    pin.input();
+    wait_us(500);
+}
\ No newline at end of file