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.
Revision 0:ce210c7aeeb5, committed 2017-02-05
- Comitter:
- shintamainjp
- Date:
- Sun Feb 05 04:05:36 2017 +0000
- Commit message:
- The first commitment.
Changed in this revision
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