fix #15 added an api to control mode and echo + fixed the implementation and added tests
This commit is contained in:
@@ -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};
|
||||
|
Reference in New Issue
Block a user