uses CRLF for playing nice with gnu screen

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
musashiaharon
Date:
Tue Nov 04 10:37:44 2014 +0000
Commit message:
fork with LF -> CRLF for compatibility with gnu screen

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 275987079d2a main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Nov 04 10:37:44 2014 +0000
@@ -0,0 +1,21 @@
+#include "mbed.h"
+#define LF      "\n"
+#define CRLF    "\r\n"
+#define NL      CRLF
+
+DigitalOut myled(LED_GREEN);
+Serial pc(USBTX, USBRX);
+
+
+int main()
+{
+    int i = 0;
+    pc.printf("Hello World!" NL);
+
+    while (true) {
+        wait(0.5f); // wait a small period of time
+        pc.printf("%d" NL, i); // print the value of variable i
+        i++; // increment the variable
+        myled = !myled; // toggle a led
+    }
+}
diff -r 000000000000 -r 275987079d2a mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Nov 04 10:37:44 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/031413cf7a89
\ No newline at end of file