fix #15 added an api to control mode and echo + fixed the implementation and added tests

This commit is contained in:
prozessorkern
2020-03-08 19:56:04 +01:00
parent e970b6c941
commit 2921f9791b
7 changed files with 164 additions and 30 deletions

View File

@@ -52,6 +52,8 @@ static shellmatta_retCode_t doSome(shellmatta_handle_t handle, const char *argum
shellmatta_write(handle, "blubb\r\n", 7u);
shellmatta_configure(handle, SHELLMATTA_MODE_INSERT, false);
(void)arguments;
(void)length;
@@ -91,6 +93,7 @@ static shellmatta_retCode_t empty(shellmatta_handle_t handle, const char *argume
(void)length;
shellmatta_printf(handle, "empty function called\r\n");
shellmatta_configure(handle, SHELLMATTA_MODE_OVERWRITE, true);
return SHELLMATTA_OK;
}
@@ -110,6 +113,8 @@ static shellmatta_retCode_t reset(shellmatta_handle_t handle, const char *argume
shellmatta_resetShell(handle, false);
}
shellmatta_configure(handle, SHELLMATTA_MODE_INSERT, true);
return SHELLMATTA_OK;
}
shellmatta_cmd_t resetCommand = {"reset", NULL, "resets the shellmatta instance", "reset [prompt]", reset, NULL};