Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
chris
Date:
Thu Nov 26 10:14:48 2009 +0000
Commit message:

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 3ce7085022d1 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Nov 26 10:14:48 2009 +0000
@@ -0,0 +1,27 @@
+#include "mbed.h"
+
+DigitalOut led1(LED1);
+DigitalOut led2(LED2);
+
+Serial pc (USBTX,USBRX);
+Serial target (p28,p27);
+
+int main() {
+
+    pc.baud(115200);
+    target.baud(115200);
+
+    while (1) {
+
+        if (pc.readable()) {
+            target.putc(pc.getc());
+            led1 = !led1;
+        }
+
+        if (target.readable()) {
+            pc.putc(target.getc());
+            led2 = !led2;
+        }
+    }
+}
+
diff -r 000000000000 -r 3ce7085022d1 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Nov 26 10:14:48 2009 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/32af5db564d4