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
--- /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
--- /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());
+    }
+}
+
+
--- /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