From 8da60ec50c642816ed55a2004e99afea1cc25147 Mon Sep 17 00:00:00 2001 From: Leo C Date: Sun, 8 Apr 2018 10:16:20 +0200 Subject: Call subcommands from main command processor --- avr/command_tbl.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'avr/command_tbl.c') diff --git a/avr/command_tbl.c b/avr/command_tbl.c index ba92933..3f74be8 100644 --- a/avr/command_tbl.c +++ b/avr/command_tbl.c @@ -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", " 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", " 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 */ -- cgit v1.2.3