]> cloudbase.mooo.com Git - z180-stamp.git/blob - avr/command_tbl.c
c0579bc29f72eed607b7ac2d700ae456ac63a355
[z180-stamp.git] / avr / command_tbl.c
1
2 #include "common.h"
3
4 #include "command.h"
5
6
7
8 extern int do_help(cmd_tbl_t *, int, int, char * const []);
9 extern int do_echo(cmd_tbl_t *, int, int, char * const []);
10 extern int do_env_print(cmd_tbl_t *, int, int, char * const []);
11 extern int do_env_set(cmd_tbl_t *, int, int, char * const []);
12
13
14 cmd_tbl_t cmd_tbl[] = {
15
16 CMD_TBL_ITEM(
17 echo, CONFIG_SYS_MAXARGS, 1, do_echo,
18 "echo args to console",
19 "[args..]\n"
20 " - echo args to console; \\c suppresses newline"
21 ),
22 CMD_TBL_ITEM_COMPLETE(
23 run, CONFIG_SYS_MAXARGS, 1, do_run,
24 "run commands in an environment variable",
25 "var [...]\n"
26 " - run the commands in the environment variable(s) 'var'",
27 var_complete
28 ),
29 CMD_TBL_ITEM_COMPLETE(
30 printenv, CONFIG_SYS_MAXARGS, 1, do_env_print,
31 "print environment variables",
32 "\n - print [all] values of all environment variables\n"
33 "printenv name ...\n"
34 " - print value of environment variable 'name'",
35 var_complete
36 ),
37 CMD_TBL_ITEM_COMPLETE(
38 setenv, CONFIG_SYS_MAXARGS, 0, do_env_set,
39 "set environment variables",
40 "[-f] name value ...\n"
41 " - [forcibly] set environment variable 'name' to 'value ...'\n"
42 "setenv [-f] name\n"
43 " - [forcibly] delete environment variable 'name'",
44 var_complete
45 ),
46 CMD_TBL_ITEM(
47 help, CONFIG_SYS_MAXARGS, 1, do_help,
48 "print command description/usage",
49 "\n"
50 " - print brief description of all commands\n"
51 "help command ...\n"
52 " - print detailed usage of 'command'"
53 ),
54
55 /* This does not use the U_BOOT_CMD macro as ? can't be used in symbol names */
56 {FSTR("?"), CONFIG_SYS_MAXARGS, 1, do_help,
57 FSTR("alias for 'help'"),
58 #ifdef CONFIG_SYS_LONGHELP
59 FSTR(""),
60 #endif /* CONFIG_SYS_LONGHELP */
61 #ifdef CONFIG_AUTO_COMPLETE
62 0,
63 #endif
64 },
65 /* Mark end of table */
66 { 0 },
67 };
68
69
70
71
72
73
74
75
76