Simple embedded shell with runtime pluggable commands.

Dependents:   DataBus2018

Implements a simple unix-like shell for embedded systems with a pluggable command architecture.

Revision:
18:2b5ed529ab37
Parent:
17:0739cb2f1930
Child:
19:bf5f5ea4e762
--- a/SimpleShell.h	Wed Dec 19 19:02:17 2018 +0000
+++ b/SimpleShell.h	Fri Dec 21 20:02:56 2018 +0000
@@ -49,7 +49,7 @@
     
 private:
     /// Maximum number of commands
-    static const int MAXLOOKUP=32;
+    static const int MAXLOOKUP=16;
 
     /// Maximum command line buffer size
     static const int MAXBUF=64;
@@ -60,6 +60,9 @@
         callback_t cb;
     } command_entry_t;
 
+    /// canonicalize path
+    char *canon(char *path);
+
     /** finds and eturns the callback for a command
      * @return Callback to a function returning void
      */
@@ -74,6 +77,9 @@
     /// Built-in shell command to print working directory
     void pwd(int argc, char **argv);
 
+    /// Built-in shell command to list files in directory
+    void ls(int argc, char **argv);
+
     /// Built-in shell command to display contents of file
     void cat(int argc, char **argv);