A UNIX emulation shell to access the underlying SDCard FileSystem through a terminal interface
Information
Dependencies not included with library:
Information
SDShell does not change the com baudrate. Access is made using the baud as initialized by the Serial object when passed into the SDShell object
Example
#include "mbed.h" #include "SDFileSystem.h" #include "SDShell.h" Serial com(USBTX, USBRX); SDFileSystem sd(p11, p12, p13, p14, "sd"); SDShell emulate; int main() { emulate.init(); emulate.shell(com, sd, "/sd"); }
Diff: SDShell.h
- Revision:
- 9:5e1764ff5dfa
- Parent:
- 5:3417ba8cb1e4
- Child:
- 10:f269775edfdf
--- a/SDShell.h Wed May 08 06:16:46 2013 +0000 +++ b/SDShell.h Tue May 14 12:49:18 2013 +0000 @@ -81,7 +81,6 @@ char _newpath[SHELL_BUF_SIZE]; char _cmd[SHELL_BUF_SIZE]; char _cmdline[SHELL_BUF_SIZE]; - char _path_to_file[SHELL_BUF_SIZE]; char *_arg; uint32_t _debug; @@ -93,7 +92,6 @@ void resolveDirectory(char *newpath, char *path); void splitName(char *path, char *dirname, char *basename); uint32_t match(char *arg1, char *arg2); - char btoa(uint8_t b); // handler functions for each known input char *ls(char *cmd); @@ -106,7 +104,8 @@ char *create(char *cmd); char *rm(char *cmd); char *exit(char *cmd); - char *debug(char *cmd); + char *debug(char *cmd); + char *du(char *cmd); }; #endif