attempt at producing a working Software Serial UART. LIBRARY DOES NOT YET WORK COMPLETELY.

Dependencies:   mbed SoftwareSerial

Files at this revision

API Documentation at this revision

Comitter:
chag
Date:
Sat Mar 17 17:27:43 2012 +0000
Commit message:

Changed in this revision

SoftwareSerial.lib Show annotated file Show diff for this revision Revisions of this file
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 6b23f6c9cdf1 SoftwareSerial.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SoftwareSerial.lib	Sat Mar 17 17:27:43 2012 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/chag/code/SoftwareSerial/#25b087be2989
diff -r 000000000000 -r 6b23f6c9cdf1 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sat Mar 17 17:27:43 2012 +0000
@@ -0,0 +1,23 @@
+#include "mbed.h"
+#include "SoftwareSerial.h"
+
+Serial pc(USBTX, USBRX);
+SoftwareSerial ss(p19, p20);
+
+
+int main() {
+    pc.baud(115200);
+    pc.putc('\f');
+    pc.printf("==== MBED Serial Proxy ====\r\n");
+    
+    wait(2);
+    ss.baud(300);
+    wait(2);
+    
+    while(1) {
+        if(pc.readable()) ss.putc(pc.getc());
+        if(ss.readable()) pc.putc(ss.getc());
+    }
+}
+
+
diff -r 000000000000 -r 6b23f6c9cdf1 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sat Mar 17 17:27:43 2012 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/737756e0b479