Echo back characters you type based in https://mbed.org/handbook/SerialPC example

Dependencies:   mbed

Fork of FRDM_serial_echo_demo by felipe manrique

Committer:
felipeM
Date:
Sat Oct 05 19:10:27 2013 +0000
Revision:
0:806d4eb73e1e
Child:
1:675b841fe7dc
Echoes back to the screen anything you type; taken from :; https://mbed.org/handbook/SerialPC

Who changed what in which revision?

UserRevisionLine numberNew contents of line
felipeM 0:806d4eb73e1e 1 #include "mbed.h"
felipeM 0:806d4eb73e1e 2
felipeM 0:806d4eb73e1e 3 Serial pc(USBTX, USBRX);
felipeM 0:806d4eb73e1e 4
felipeM 0:806d4eb73e1e 5 int main() {
felipeM 0:806d4eb73e1e 6 pc.printf("Echoes back to the screen anything you type\n");
felipeM 0:806d4eb73e1e 7 while(1) {
felipeM 0:806d4eb73e1e 8 pc.putc(pc.getc());
felipeM 0:806d4eb73e1e 9 }
felipeM 0:806d4eb73e1e 10 }