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.
Shell.h
00001 #ifndef _TINY_SHELL_H_ 00002 #define _TINY_SHELL_H_ 00003 00004 #include "mbed.h" 00005 #include "cmsis_os.h" 00006 00007 #define SHELL_MAX_LINE_LENGTH 64 00008 #define SHELL_MAX_ARGUMENTS 4 00009 00010 typedef void (*shellcmd_t) (Stream *, int , char **); 00011 00012 typedef struct { 00013 const char * sc_name; 00014 shellcmd_t sc_func; 00015 } ShellCommand; 00016 00017 typedef struct { 00018 Stream * sc_channel; 00019 ShellCommand * sc_commands; 00020 } ShellConfig; 00021 00022 #ifdef __cplusplus 00023 extern "C" { 00024 #endif 00025 00026 /* User commands */ 00027 void cmd_ls(Stream * chp, int argc, char * argv[]); 00028 void cmd_sensor(Stream * chp, int argc, char * argv[]); 00029 void cmd_load(Stream * chp, int argc, char * argv[]); 00030 void cmd_rollimages(Stream * chp, int argc, char * argv[]); 00031 00032 void shellStart(const ShellConfig *); 00033 bool shellGetLine(Stream * chp, char *line, unsigned size); 00034 void shellUsage(Stream * chp, const char *p); 00035 00036 #ifdef __cplusplus 00037 } 00038 #endif 00039 00040 #endif 00041
Generated on Tue Jul 12 2022 18:55:01 by
