Akifumi Takahashi / Mbed 2 deprecated SerialInputReactionHandler_DEMO

Dependencies:   mbed SerialInputReactionHandler

Revision:
0:27eb52652bc3
diff -r 000000000000 -r 27eb52652bc3 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Oct 21 18:08:17 2020 +0000
@@ -0,0 +1,17 @@
+#include "mbed.h"
+#include "SerialInputReactionHandler.h"
+
+int main()
+{
+    // Initialise the digital pin LED1 as an output
+    DigitalOut led(LED1);
+    SerialInputReactionHandler reactor;
+    Serial pc(USBTX, USBRX, 921600);
+    
+    pc.attach(callback(&reactor, &SerialInputReactionHandler::key_bind));
+
+    while (true) {
+        led = !led;
+        wait(.5);
+    }
+}