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:cb13f0c964c0
- Child:
- 1:201290089367
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Thu Aug 16 11:45:58 2018 +0000
@@ -0,0 +1,28 @@
+#include "mbed.h"
+#include "Serial.h"
+
+Serial usbSerial(USBTX, USBRX);
+InterruptIn mybutton(USER_BUTTON,PullUp);
+
+
+void ISR_Serial_Rx()
+{
+ // シリアルの受信処理
+ char data = usbSerial.getc();
+}
+
+void ISR_Serial_Tx()
+{
+ // シリアルのs送信処理
+ usbSerial.attach(NULL, Serial::TxIrq);
+}
+
+void isr() {
+ usbSerial.puts("a");
+}
+
+int main()
+{
+ mybutton.fall(&isr);
+ while (1) {}
+}
\ No newline at end of file