This program test's the serial communication (RS232) for GR-PEACH board at 9600 baud rate. It echo’s the character back on screen for testing the transmit and receive modes.
Revision 0:56614af10008, committed 2016-09-27
- Comitter:
- ec_rahul46
- Date:
- Tue Sep 27 05:22:57 2016 +0000
- Commit message:
- This is a program to test serial communication of GR-PEACH board at 9600 baud rate, 1 stop bit , no parity and flow control
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 Tue Sep 27 05:22:57 2016 +0000
@@ -0,0 +1,12 @@
+//Echo back characters you type
+
+#include "mbed.h"
+
+Serial pc(USBTX, USBRX);
+
+int main() {
+ pc.printf("Echoes back to the screen anything you type\n");
+ while(1) {
+ pc.putc(pc.getc());
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Tue Sep 27 05:22:57 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/abea610beb85 \ No newline at end of file