Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Diff: main.cpp
- Revision:
- 0:654a49387753
- Child:
- 1:c373f768ba41
diff -r 000000000000 -r 654a49387753 main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Wed Aug 19 14:01:11 2020 +0000
@@ -0,0 +1,21 @@
+#include "mbed.h"
+int main()
+{
+ Serial pc(USBTX, USBRX,38400);//ボーレートを落とすと,USB側からのデータが正確に出力されない.
+ Serial uart(PA_9,PA_10,19200);//TX(IM920_RX), RX(IM920_TX)
+
+ DigitalOut pc_activity(LED1);
+ DigitalOut uart_activity(LED2);
+
+ while(1) {
+ if(pc.readable()) {
+ uart.putc(pc.getc());
+ pc_activity = !pc_activity;
+ }
+ if(uart.readable()) {
+ pc.putc(uart.getc());
+ uart_activity = !uart_activity;
+ }
+ }
+
+}