Test BufferedSerial class

Dependencies:   BufferedSerial mbed

Files at this revision

API Documentation at this revision

Comitter:
jurgis
Date:
Sat Sep 06 12:55:21 2014 +0000
Commit message:
Initial commit

Changed in this revision

BufferedSerial.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/BufferedSerial.lib	Sat Sep 06 12:55:21 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/sam_grove/code/BufferedSerial/#4d6a311fc8bf
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sat Sep 06 12:55:21 2014 +0000
@@ -0,0 +1,25 @@
+#include "mbed.h"
+#include "BufferedSerial.h"
+
+
+DigitalOut myled(LED2);
+BufferedSerial pc(USBTX, USBRX);
+//Serial pc(USBTX, USBRX);
+
+
+int main()
+{
+    pc.baud(115200);
+    pc.printf("\r\n\r\nProgram started\r\n");
+
+    while(1)
+    {
+        pc.printf("OFF\r\n");
+        myled = 1;
+        wait(1);
+        
+        pc.printf("ON\r\n");
+        myled = 0;
+        wait(1);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sat Sep 06 12:55:21 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/9327015d4013
\ No newline at end of file