Natural Tiny Shell (NT-Shell) library is a tiny shell library for a small embedded system. The interface is really simple. You should only know ntshell_execute in ntshell.h. So you can port it to any embedded system easily. Please enjoy your small embedded system with it. :)

Dependencies:   mbed NaturalTinyShell

Committer:
shintamainjp
Date:
Thu May 26 21:27:20 2016 +0000
Revision:
1:215d60da45d1
Parent:
0:88f4d656d494
I just removed an instance of DigitalOut for the LED because it doesn't use it. Thanks @GarageStyleMsc !

Who changed what in which revision?

UserRevisionLine numberNew contents of line
shintamainjp 0:88f4d656d494 1 /*
shintamainjp 0:88f4d656d494 2 * ===============================================================
shintamainjp 0:88f4d656d494 3 * Natural Tiny Shell (NT-Shell) Application example.
shintamainjp 0:88f4d656d494 4 * Version 0.0.6
shintamainjp 0:88f4d656d494 5 * ===============================================================
shintamainjp 0:88f4d656d494 6 * Copyright (c) 2010-2011 Shinichiro Nakamura
shintamainjp 0:88f4d656d494 7 *
shintamainjp 0:88f4d656d494 8 * Permission is hereby granted, free of charge, to any person
shintamainjp 0:88f4d656d494 9 * obtaining a copy of this software and associated documentation
shintamainjp 0:88f4d656d494 10 * files (the "Software"), to deal in the Software without
shintamainjp 0:88f4d656d494 11 * restriction, including without limitation the rights to use,
shintamainjp 0:88f4d656d494 12 * copy, modify, merge, publish, distribute, sublicense, and/or
shintamainjp 0:88f4d656d494 13 * sell copies of the Software, and to permit persons to whom the
shintamainjp 0:88f4d656d494 14 * Software is furnished to do so, subject to the following
shintamainjp 0:88f4d656d494 15 * conditions:
shintamainjp 0:88f4d656d494 16 *
shintamainjp 0:88f4d656d494 17 * The above copyright notice and this permission notice shall be
shintamainjp 0:88f4d656d494 18 * included in all copies or substantial portions of the Software.
shintamainjp 0:88f4d656d494 19 *
shintamainjp 0:88f4d656d494 20 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
shintamainjp 0:88f4d656d494 21 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
shintamainjp 0:88f4d656d494 22 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
shintamainjp 0:88f4d656d494 23 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
shintamainjp 0:88f4d656d494 24 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
shintamainjp 0:88f4d656d494 25 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
shintamainjp 0:88f4d656d494 26 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
shintamainjp 0:88f4d656d494 27 * OTHER DEALINGS IN THE SOFTWARE.
shintamainjp 0:88f4d656d494 28 * ===============================================================
shintamainjp 0:88f4d656d494 29 */
shintamainjp 0:88f4d656d494 30
shintamainjp 0:88f4d656d494 31 #include "cmd.h"
shintamainjp 0:88f4d656d494 32 #include <mbed.h>
shintamainjp 0:88f4d656d494 33
shintamainjp 0:88f4d656d494 34 void cmd_foo(int argc, char **argv)
shintamainjp 0:88f4d656d494 35 {
shintamainjp 0:88f4d656d494 36 printf("This is %s\n", __func__);
shintamainjp 0:88f4d656d494 37 }
shintamainjp 0:88f4d656d494 38
shintamainjp 0:88f4d656d494 39 void cmd_bar(int argc, char **argv)
shintamainjp 0:88f4d656d494 40 {
shintamainjp 0:88f4d656d494 41 printf("This is %s\n", __func__);
shintamainjp 0:88f4d656d494 42 }
shintamainjp 0:88f4d656d494 43
shintamainjp 0:88f4d656d494 44 void cmd_baz(int argc, char **argv)
shintamainjp 0:88f4d656d494 45 {
shintamainjp 0:88f4d656d494 46 printf("This is %s\n", __func__);
shintamainjp 0:88f4d656d494 47 }