]>
cloudbase.mooo.com Git - z180-stamp.git/blob - avr/command_tbl.c
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 extern int do_env_save(cmd_tbl_t
*, int, int, char * const []);
13 extern int do_loadf(cmd_tbl_t
*, int, int, char * const []);
14 extern int do_go(cmd_tbl_t
*, int, int, char * const []);
15 extern int do_restart(cmd_tbl_t
*, int, int, char * const []);
16 extern int do_dump_mem(cmd_tbl_t
*, int, int, char * const []);
17 extern int do_eep_cp(cmd_tbl_t
*, int, int, char * const []);
18 extern int do_busreq_pulse(cmd_tbl_t
*, int, int, char * const []);
21 cmd_tbl_t cmd_tbl
[] = {
25 !mdr
, 3, 1, do_dump_mem
,
30 !mde
, 3, 1, do_dump_mem
,
35 !cpe
, 4, 0, do_eep_cp
,
41 mstep
, 2, 1, do_busreq_pulse
,
42 "execute one M cycle",
44 " - repeat count times"
47 echo
, CONFIG_SYS_MAXARGS
, 1, do_echo
,
48 "echo args to console",
50 " - echo args to console; \\c suppresses newline"
52 CMD_TBL_ITEM_COMPLETE(
53 run
, CONFIG_SYS_MAXARGS
, 1, do_run
,
54 "run commands in an environment variable",
56 " - run the commands in the environment variable(s) 'var'",
59 CMD_TBL_ITEM_COMPLETE(
60 printenv
, CONFIG_SYS_MAXARGS
, 1, do_env_print
,
61 "print environment variables",
63 " - print values of all environment variables\n"
65 " - print value of environment variable 'name'",
68 CMD_TBL_ITEM_COMPLETE(
69 setenv
, CONFIG_SYS_MAXARGS
, 0, do_env_set
,
70 "set environment variables",
72 " - set environment variable 'name' to 'value ...'\n"
74 " - delete environment variable 'name'",
78 saveenv
, 1, 0, do_env_save
,
79 "save environment variables to persistent storage",
84 loadf
, 1, 0, do_loadf
,
85 "load srec_cat prepared image from controller flash",
90 "start application at address 'addr'",
92 " - start application at address 'addr'"
94 // " passing 'arg' as arguments"
97 reset
, 1, 0, do_reset
,
98 "Keep CPU in RESET state",
102 restart
, 1, 0, do_restart
,
103 "Perform RESET of the CPU",
110 "address [# of objects]"
114 "memory modify (auto-incrementing address)",
119 "memory modify (constant address)",
124 "memory write (fill)",
125 "address value [count]"
130 "source target count"
133 cmp
, 4, 1, do_mem_cmp
,
138 base
, 2, 1, do_mem_base
,
139 "print or set address offset",
141 " - print address offset for memory commands\n"
143 " - set address offset for memory commands to 'offset'"
146 loop
, 3, 1, do_mem_loop
,
147 "infinite loop on address range",
148 "address number_of_bytes"
152 loopw
, 4, 1, do_mem_loopw
,
153 "infinite write loop on address range",
154 "address number_of_bytes data_to_write"
156 #endif /* CONFIG_LOOPW */
158 #ifdef CONFIG_CMD_MEMTEST
160 mtest
, 5, 1, do_mem_mtest
,
161 "simple RAM read/write test",
162 "[start [end [pattern [iterations]]]]"
164 #endif /* CONFIG_CMD_MEMTEST */
166 #ifdef CONFIG_MX_CYCLIC
168 mdc
, 4, 1, do_mem_mdc
,
169 "memory display cyclic",
170 "address count delay(ms)"
173 mwc
, 4, 1, do_mem_mwc
,
174 "memory write cyclic",
175 "address value delay(ms)"
177 #endif /* CONFIG_MX_CYCLIC */
181 help
, CONFIG_SYS_MAXARGS
, 1, do_help
,
182 "print command description/usage",
184 " - print brief description of all commands\n"
186 " - print detailed usage of 'command'"
189 /* This does not use the CMD_TBL_ITEM macro as ? can't be used in symbol names */
190 {FSTR("?"), CONFIG_SYS_MAXARGS
, 1, do_help
,
191 FSTR("alias for 'help'"),
192 #ifdef CONFIG_SYS_LONGHELP
194 #endif /* CONFIG_SYS_LONGHELP */
195 #ifdef CONFIG_AUTO_COMPLETE
199 /* Mark end of table */