Shinichiro Nakamura / Mbed 2 deprecated MicroShellExample

Dependencies:   mbed MicroShell

Files at this revision

API Documentation at this revision

Comitter:
shintamainjp
Date:
Sun Feb 05 04:05:36 2017 +0000
Commit message:
The first commitment.

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
microshell.lib Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r ce210c7aeeb5 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sun Feb 05 04:05:36 2017 +0000
@@ -0,0 +1,42 @@
+#include "mbed.h"
+#include "microshell.h"
+#include "msconf.h"
+
+Serial pc(USBTX, USBRX);
+
+static void utx(char c)
+{
+    pc.putc(c);
+}
+
+static char urx(void)
+{
+    return pc.getc();
+}
+
+static void action_hook(MSCORE_ACTION action)
+{
+}
+
+int main(void)
+{
+    char buf[MSCONF_MAX_INPUT_LENGTH];
+    MICROSHELL ms;
+
+    puts(
+            "\r\n\r\n"
+            "======================================\r\n"
+            " MicroShell Simple Example for LPC824 \r\n"
+            "======================================\r\n"
+            );
+    puts(" Type 'help' for a list of commands.\r\n");
+
+    microshell_init(&ms, utx, urx, action_hook);
+
+    while (1) {
+        puts("MicroShell>");
+        microshell_getline(&ms, buf, sizeof(buf));
+    }
+
+    return 0;
+}
\ No newline at end of file
diff -r 000000000000 -r ce210c7aeeb5 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sun Feb 05 04:05:36 2017 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/176b8275d35d
\ No newline at end of file
diff -r 000000000000 -r ce210c7aeeb5 microshell.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/microshell.lib	Sun Feb 05 04:05:36 2017 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/users/shintamainjp/code/MicroShell/#e91b984e285d