example serial

Dependencies:   mbed

Fork of mDot_Serial_Example by MultiTech

Revision:
0:d88fbcdff4fb
Child:
1:d2ee7143632f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Oct 02 14:23:27 2015 +0000
@@ -0,0 +1,21 @@
+/** Dragonfly Serial Example Program
+ *
+ * This program demonstrates how to do handle a serial port
+ * using the MultiTech Dragonfly and MultiTech UDK2 hardware.
+ *
+ * This program echos characters on the debug serial port.
+ * The debug serial port is operated at the default baud, 9600.
+ * Connect your terminal application to the appropriate COM/tty
+ * port on your PC. See https://developer.mbed.org/handbook/SerialPC
+ * for details.
+ */
+ 
+#include "mbed.h"
+ 
+int main() {
+    Serial pc(USBTX, USBRX);
+    
+    while (true)
+        if (pc.readable())
+            pc.putc(pc.getc());
+}
\ No newline at end of file