]> cloudbase.mooo.com Git - z180-stamp.git/blobdiff - include/command.h
do_ls() (WIP)
[z180-stamp.git] / include / command.h
index e44512e4b492fb4fb8eed7bd8ad0ad4bde14ca54..54c04727f92df4f5abbc461c5a5148de95320a7b 100644 (file)
@@ -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[]);
@@ -133,8 +132,10 @@ extern int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc,
 /*
  * 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,