forked from platformio/platformio-core
Add serial port example with mbed framework
This commit is contained in:
10
examples/mbed/mbed-serial/src/main.cpp
Normal file
10
examples/mbed/mbed-serial/src/main.cpp
Normal 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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user