]> cloudbase.mooo.com Git - z180-stamp.git/blobdiff - avr/command_tbl.c
Call subcommands from main command processor
[z180-stamp.git] / avr / command_tbl.c
index 49ddcef2b6243552b794ae71e7be4287b6c43a61..4f94d59b0e69a335477536176a549f1faabef560 100644 (file)
@@ -39,12 +39,8 @@ extern command_ret_t do_source(cmd_tbl_t *, uint_fast8_t, int, char * const []);
 extern command_ret_t do_attach(cmd_tbl_t *, uint_fast8_t, int, char * const []);
 extern command_ret_t do_pr_free_avr(cmd_tbl_t *, uint_fast8_t, int, char * const []);
 
-#ifdef CONFIG_SYS_LONGHELP
-const FLASH char sd_help_text[] =
-       "bla \t- do bla\n"
-       ;
-#endif /* CONFIG_SYS_LONGHELP */
-
+extern cmd_tbl_t cmd_tbl_fat[];
+extern cmd_tbl_t cmd_tbl_sd[];
 
 cmd_tbl_t cmd_tbl[] = {
 
@@ -343,19 +339,21 @@ CMD_TBL_ITEM(
 ),
 #endif /* CONFIG_MX_CYCLIC */
 
-CMD_TBL_ITEM(
+CMD_TBL_ITEM_TOP(
        sd,   CONFIG_SYS_MAXARGS, 1, do_sd,
        "SD/MMC card handling commands",
        "<subcommand> args ...\n"
        "sd help\n"
-       "    - print help on subcommands"
+       "    - print help on subcommands",
+       cmd_tbl_sd
 ),
-CMD_TBL_ITEM(
+CMD_TBL_ITEM_TOP(
        fat,   CONFIG_SYS_MAXARGS, 1, do_fat,
        "fat filesystem commands",
        "<subcommand> args ...\n"
        "fat help\n"
-       "    - print help on subcommands"
+       "    - print help on subcommands",
+       cmd_tbl_fat
 ),
 
 CMD_TBL_ITEM(
@@ -379,7 +377,7 @@ CMD_TBL_ITEM(
        "    -a      Detach all.\n"
        "\n"
        "attach\n"
-       "    Without arguments, list current assignments\n"
+       "    Without arguments, list current assignments"
 ),
 CMD_TBL_ITEM(
        detach, 2,      CTBL_REPEAT,    do_attach,
@@ -403,8 +401,9 @@ CMD_TBL_ITEM(
 #ifdef  CONFIG_SYS_LONGHELP
        FSTR(""),
 #endif /* CONFIG_SYS_LONGHELP */
+       NULL,
 #ifdef CONFIG_AUTO_COMPLETE
-       0,
+       NULL,
 #endif
 },
 /* Mark end of table */