Add serial port example with mbed framework

This commit is contained in:
Valeriy Koval
2015-03-16 12:12:13 +02:00
parent 57b84789c0
commit c536aca961
3 changed files with 74 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
#include "mbed.h"
Serial pc(USBTX, USBRX); // tx, rx
int main() {
pc.printf("Hello World!\n\r");
while(1) {
pc.putc(pc.getc() + 1); // echo input back to terminal
}
}