UART test for the CORE-1000

Dependencies:   mbed

Revision:
0:7c5a7244a344
diff -r 000000000000 -r 7c5a7244a344 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Jan 09 04:23:27 2019 +0000
@@ -0,0 +1,26 @@
+#include <mbed.h>
+
+
+//const char hometown[15] = "Coreone tech";
+//const char banner[37]   = "Serial Communication Test";
+const char PROMPT       = '>';
+DigitalOut myled(LED1);
+//Serial pc(USBTX, USBRX); // tx, rx
+Serial pc(PA_11, PA_12); // tx, rx
+int main() {
+    pc.baud(115200);
+ //   displayBanner();
+ //   newline();
+    pc.putc(PROMPT);
+    while(1) 
+    {
+     if(pc.readable())
+        { 
+           
+            char c = pc.getc();
+            printf("%c\n\r", c);
+            myled = !myled;
+        }
+         pc.printf("test\n\r");
+    }
+}
\ No newline at end of file