USER PASS
/
serial_test
test
Revision 0:ad2a655be407, committed 2017-11-16
- Comitter:
- USER10
- Date:
- Thu Nov 16 00:22:38 2017 +0000
- Commit message:
- Serial
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 |
diff -r 000000000000 -r ad2a655be407 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Nov 16 00:22:38 2017 +0000 @@ -0,0 +1,14 @@ +#include "mbed.h"//mbed -> mbed -> PC + +Serial pc1(p9, p10);//tx3, rx3 +Serial pc2(p13, p14);//tx1, rx1 + +int main() { + char ch; + while(1) { + if(pc2.readable()) { // 受信確認 + ch = pc2.getc(); // 1文字取り出し + pc1.putc(ch); // 送信 + } + } +} \ No newline at end of file
diff -r 000000000000 -r ad2a655be407 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Nov 16 00:22:38 2017 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/5e5da4a5990b \ No newline at end of file