subsys: shell: add dummy backend to simplify commands testing

Added dummy backend which can be enabled with Kconfig. By default it is
disabled because it needs the same amount of memory as other phisical
backends. It shall be use only for commands testing purposes.

Improved shell_execute_cmd function, now it clears command context
before new command will be executed.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
This commit is contained in:
Jakub Rzeszutko 2018-10-02 14:47:20 +02:00 committed by Anas Nashif
commit c3bc7180b0
8 changed files with 188 additions and 3 deletions

View file

@ -100,3 +100,8 @@ static int enable_shell_uart(struct device *arg)
return 0;
}
SYS_INIT(enable_shell_uart, POST_KERNEL, 0);
const struct shell *shell_backend_uart_get_ptr(void)
{
return &uart_shell;
}