RawSerial Helloworld example

Fork of RawSerial_ex_1 by mbed_example

Revision:
1:f21d95cb733d
Parent:
0:c68431f372b4
--- a/main.cpp	Mon Oct 09 20:03:26 2017 +0000
+++ b/main.cpp	Tue Oct 10 19:04:22 2017 +0000
@@ -1,8 +1,25 @@
+/* mbed Example Program
+ * Copyright (c) 2006-2014 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 #include "mbed.h"
  
-RawSerial device(USBTX, USBRX);  // tx, rx
+RawSerial pc(USBTX, USBRX); // tx, rx
  
 int main() {
-    device.baud(19200);
-    device.printf("Hello World\n");
+    pc.printf("Hello World!\n\r");
+    while(1) {
+        pc.putc(pc.getc()); // echo input back to terminal
+    }
 }
\ No newline at end of file