X-Git-Url: http://cloudbase.mooo.com/gitweb/z180-stamp.git/blobdiff_plain/35edb766593d019b89a3f40b6d6cdd2b50f18032..fcf1d5b30bd3b341fb7596aef395f347c6dc97b4:/include/cli.h diff --git a/include/cli.h b/include/cli.h index f6fb2ab..e6df408 100644 --- a/include/cli.h +++ b/include/cli.h @@ -1,15 +1,17 @@ /* - * (C) Copyright 2014 Leo C. + * (C) Copyright 2014-2016 Leo C. * * (C) Copyright 2014 Google, Inc * Simon Glass * - * SPDX-License-Identifier: GPL-2.0+ + * SPDX-License-Identifier: GPL-2.0 */ #ifndef CLI_H #define CLI_H +#include "common.h" + /** * Go into the command loop * @@ -30,7 +32,7 @@ void cli_loop(void); * (If cmd is NULL or "" or longer than CONFIG_SYS_CBSIZE-1 it is * considered unrecognized) */ -//int cli_simple_run_command(const char *cmd, int flag); +//int cli_simple_run_command(const char *cmd, uint_fast8_t flag); /** * cli_simple_run_command_list() - Execute a list of command @@ -45,7 +47,7 @@ void cli_loop(void); * @param flag Execution flags (CMD_FLAG_...) * @return 0 on success, or != 0 on error. */ -//int cli_simple_run_command_list(char *cmd, int flag); +//int cli_simple_run_command_list(char *cmd, uint_fast8_t flag); /** * parse_line() - split a command line down into separate arguments @@ -66,6 +68,15 @@ void cli_loop(void); */ //int cli_simple_parse_line(char *line, char *argv[]); +/* + * Run a command. + * + * @param cmd Command to run + * @param flag Execution flags (CMD_FLAG_...) + * @return 0 on success, or != 0 on error. + */ +int run_command(const char *cmd, uint_fast8_t flag); + int run_command_list(const char *cmd, int len);