X-Git-Url: http://cloudbase.mooo.com/gitweb/z180-stamp.git/blobdiff_plain/5caa8c2b8906f17ca97aad2be3d746c3b5fef8f3..bc72540aa158b4eba2dcda3e7921caa7f970ff9a:/include/command.h diff --git a/include/command.h b/include/command.h index 2ea7505..93c9a2d 100644 --- a/include/command.h +++ b/include/command.h @@ -1,5 +1,5 @@ /* - * (C) Copyright 2014-2016 Leo C. + * (C) Copyright 2014-2016, 2018 Leo C. * * (C) Copyright 2000-2009 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. @@ -50,13 +50,12 @@ struct cmd_tbl_s { uint8_t maxargs; /* maximum number of arguments */ uint8_t flags; /* autorepeat allowed? */ /* Implementation function */ - command_ret_t (*cmd)(const FLASH struct cmd_tbl_s *, uint_fast8_t, int, char * const []); + command_ret_t (*cmd)(cmd_tbl_t *, uint_fast8_t, int, char * const []); const FLASH char *usage; /* Usage message (short) */ #ifdef CONFIG_SYS_LONGHELP const FLASH char *help; /* Help message (long) */ #endif cmd_tbl_t *subcmd; -// const FLASH struct cmd_tbl_s *subcommands; #ifdef CONFIG_AUTO_COMPLETE /* do auto completion on the arguments */ int (*complete)(int argc, char * const argv[], char last_char, int maxv, char *cmdv[]); @@ -82,7 +81,6 @@ cmd_process(uint_fast8_t flag, int argc, char * const argv[], uint_fast8_t *repe /* command.c */ command_ret_t do_help(cmd_tbl_t *cmdtp, uint_fast8_t flag, int argc, char * const argv[]); -int cmd_tbl_item_count(cmd_tbl_t *p); command_ret_t cmd_usage(cmd_tbl_t *cmdtp); #ifdef CONFIG_AUTO_COMPLETE @@ -124,8 +122,6 @@ static inline int bootm_maybe_autostart(cmd_tbl_t *cmdtp UNUSED, const char *cmd extern int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc, char *const argv[]); -extern command_ret_t do_reset(cmd_tbl_t *cmdtp, uint_fast8_t flag, int argc, char * const argv[]); - /* * Command Flags: */ @@ -135,8 +131,10 @@ extern command_ret_t do_reset(cmd_tbl_t *cmdtp, uint_fast8_t flag, int argc, cha /* * Flags for command table: */ -#define CTBL_REPEAT 0x01 /* command is repeatable */ +#define CTBL_RPT 0x01 /* command is repeatable */ #define CTBL_SUBCMD 0x02 /* command has subcommands */ +#define CTBL_SUBCMDAUTO 0x04 /* execute subcommands whithout prefix */ +#define CTBL_DBG 0x08 /* command is only for debugging */ #ifdef CONFIG_AUTO_COMPLETE # define _CMD_COMPLETE(x) x,