]>
cloudbase.mooo.com Git - z180-stamp.git/blob - avr/command_tbl.c
c721d536e9febe1fac0534bb28be87c3ad937965
8 extern command_ret_t
do_help(cmd_tbl_t
*, int, int, char * const []);
9 extern command_ret_t
do_echo(cmd_tbl_t
*, int, int, char * const []);
10 extern command_ret_t
do_env_print(cmd_tbl_t
*, int, int, char * const []);
11 extern command_ret_t
do_env_default(cmd_tbl_t
*, int, int, char * const []);
12 extern command_ret_t
do_env_set(cmd_tbl_t
*, int, int, char * const []);
13 extern command_ret_t
do_env_save(cmd_tbl_t
*, int, int, char * const []);
14 extern command_ret_t
do_loadf(cmd_tbl_t
*, int, int, char * const []);
15 extern command_ret_t
do_go(cmd_tbl_t
*, int, int, char * const []);
16 extern command_ret_t
do_restart(cmd_tbl_t
*, int, int, char * const []);
17 extern command_ret_t
do_dump_mem(cmd_tbl_t
*, int, int, char * const []);
18 extern command_ret_t
do_eep_cp(cmd_tbl_t
*, int, int, char * const []);
19 extern command_ret_t
do_busreq_pulse(cmd_tbl_t
*, int, int, char * const []);
20 extern command_ret_t
do_date(cmd_tbl_t
*, int, int, char * const []);
21 extern command_ret_t
do_clock(cmd_tbl_t
*, int, int, char * const []);
24 cmd_tbl_t cmd_tbl
[] = {
28 "get/set/reset date & time",
29 "[MMDDhhmm[[CC]YY][.ss]]\ndate reset\n"
30 " - without arguments: print date & time\n"
31 " - with numeric argument: set the system date & time\n"
32 " - with 'reset' argument: reset the RTC"
37 !mdr
, 3, 1, do_dump_mem
,
42 !mde
, 3, 1, do_dump_mem
,
47 !cpe
, 4, 0, do_eep_cp
,
53 mstep
, 2, 1, do_busreq_pulse
,
54 "execute one M cycle",
56 " - repeat count times"
59 echo
, CONFIG_SYS_MAXARGS
, 1, do_echo
,
60 "echo args to console",
62 " - echo args to console; \\c suppresses newline"
64 CMD_TBL_ITEM_COMPLETE(
65 run
, CONFIG_SYS_MAXARGS
, 1, do_run
,
66 "run commands in an environment variable",
68 " - run the commands in the environment variable(s) 'var'",
71 CMD_TBL_ITEM_COMPLETE(
72 printenv
, CONFIG_SYS_MAXARGS
, 1, do_env_print
,
73 "print environment variables",
75 " - print values of all environment variables\n"
77 " - print value of environment variable 'name'",
80 CMD_TBL_ITEM_COMPLETE(
81 setenv
, CONFIG_SYS_MAXARGS
, 0, do_env_set
,
82 "set environment variables",
84 " - set environment variable 'name' to 'value ...'\n"
86 " - delete environment variable 'name'",
90 saveenv
, 1, 0, do_env_save
,
91 "save environment variables to persistent storage",
95 defaultenv
, 1, 0, do_env_default
,
96 "set all environment variables to their default values",
101 loadf
, 1, 0, do_loadf
,
102 "load srec_cat prepared image from controller flash",
107 "start application at address 'addr'",
109 " - start application at address 'addr'"
111 // " passing 'arg' as arguments"
114 reset
, 1, 0, do_reset
,
115 "Keep CPU in RESET state",
119 restart
, 1, 0, do_restart
,
120 "Perform RESET of the CPU",
124 clock
, 2, 0, do_clock
,
125 "Set or get CPU frequency",
132 "address [# of objects]"
136 "memory modify (auto-incrementing address)",
141 "memory modify (constant address)",
146 "memory write (fill)",
147 "address value [count]"
152 "source target count"
155 cmp
, 4, 1, do_mem_cmp
,
160 base
, 2, 1, do_mem_base
,
161 "print or set address offset",
163 " - print address offset for memory commands\n"
165 " - set address offset for memory commands to 'offset'"
168 loop
, 3, 1, do_mem_loop
,
169 "infinite loop on address range",
170 "address number_of_bytes"
174 loopw
, 4, 1, do_mem_loopw
,
175 "infinite write loop on address range",
176 "address number_of_bytes data_to_write"
178 #endif /* CONFIG_LOOPW */
180 #ifdef CONFIG_CMD_MEMTEST
182 mtest
, 5, 1, do_mem_mtest
,
183 "simple RAM read/write test",
184 "[start [end [pattern [iterations]]]]"
186 #endif /* CONFIG_CMD_MEMTEST */
188 #ifdef CONFIG_MX_CYCLIC
190 mdc
, 4, 1, do_mem_mdc
,
191 "memory display cyclic",
192 "address count delay(ms)"
195 mwc
, 4, 1, do_mem_mwc
,
196 "memory write cyclic",
197 "address value delay(ms)"
199 #endif /* CONFIG_MX_CYCLIC */
203 help
, CONFIG_SYS_MAXARGS
, 1, do_help
,
204 "print command description/usage",
206 " - print brief description of all commands\n"
208 " - print detailed usage of 'command'"
211 /* This does not use the CMD_TBL_ITEM macro as ? can't be used in symbol names */
212 {FSTR("?"), CONFIG_SYS_MAXARGS
, 1, do_help
,
213 FSTR("alias for 'help'"),
214 #ifdef CONFIG_SYS_LONGHELP
216 #endif /* CONFIG_SYS_LONGHELP */
217 #ifdef CONFIG_AUTO_COMPLETE
221 /* Mark end of table */