Simple embedded shell with runtime pluggable commands.
Implements a simple unix-like shell for embedded systems with a pluggable command architecture.
SimpleShell.h
- Committer:
- shimniok
- Date:
- 2018-12-02
- Revision:
- 1:998a7ed04f10
- Parent:
- 0:49820d5a38c9
- Child:
- 2:4f0affdb7db9
File content as of revision 1:998a7ed04f10:
#include "mbed.h" class SimpleShell { public: SimpleShell(); void attach(Callback<void()> cb, char *command); // void registerCommand(char *commandString, char *helpText, Callback<void(float)> cb); void run(); private: static const int MAXBUF=128; void printPrompt(void); void readCommand(); char cmd[MAXBUF]; char _cwd[MAXBUF]; }; // class