close #31 - made all command parameter except the command name optional + added and fixed tests
This commit is contained in:
@@ -85,6 +85,17 @@ static shellmatta_retCode_t quit(shellmatta_handle_t handle, const char *argumen
|
||||
}
|
||||
shellmatta_cmd_t quitCommand = {"quit", "q", "Function quits the shell", "", quit, NULL};
|
||||
|
||||
static shellmatta_retCode_t empty(shellmatta_handle_t handle, const char *arguments, uint32_t length)
|
||||
{
|
||||
(void)arguments;
|
||||
(void)length;
|
||||
|
||||
shellmatta_printf(handle, "empty function called\r\n");
|
||||
|
||||
return SHELLMATTA_OK;
|
||||
}
|
||||
shellmatta_cmd_t emptyCommand = {"empty", NULL, NULL, NULL, empty, NULL};
|
||||
|
||||
|
||||
shellmatta_retCode_t writeFct(const char* data, uint32_t length)
|
||||
{
|
||||
@@ -128,6 +139,7 @@ int main(int argc, char **argv)
|
||||
shellmatta_addCmd(handle, &doSomeCmd);
|
||||
shellmatta_addCmd(handle, &quitCommand);
|
||||
shellmatta_addCmd(handle, &removeCommand);
|
||||
shellmatta_addCmd(handle, &emptyCommand);
|
||||
|
||||
while(exitRequest == false)
|
||||
{
|
||||
|
Reference in New Issue
Block a user