subsys: shell: add handlers diagnostic function
Added function: shell_execute_cmd that can be called for command diagnostic purposes. Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
This commit is contained in:
parent
99f64c1e47
commit
61ca8c17c8
2 changed files with 32 additions and 0 deletions
|
@ -585,6 +585,20 @@ bool shell_cmd_precheck(const struct shell *shell,
|
|||
void shell_print_stream(const void *user_ctx, const char *data,
|
||||
size_t data_len);
|
||||
|
||||
/** @brief Execute command.
|
||||
*
|
||||
* Pass command line to shell to execute.
|
||||
*
|
||||
* Note: This by no means makes any of the commands a stable interface, so
|
||||
* this function should only be used for debugging/diagnostic.
|
||||
*
|
||||
* @param[in] shell Pointer to the shell instance.
|
||||
* @param[in] cmd Command to be executed.
|
||||
*
|
||||
* @returns Result of the execution
|
||||
*/
|
||||
int shell_execute_cmd(const struct shell *shell, const char *cmd);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue