UART test for the CORE-1000

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
odb
Date:
Wed Jan 09 04:23:27 2019 +0000
Commit message:
UART test for the CORE-1000

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
--- /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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Jan 09 04:23:27 2019 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/4f6c30876dfa
\ No newline at end of file