]>
cloudbase.mooo.com Git - z180-stamp.git/blob - avr/command_tbl.c
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 []);
23 cmd_tbl_t cmd_tbl
[] = {
27 "get/set/reset date & time",
28 "[MMDDhhmm[[CC]YY][.ss]]\ndate reset\n"
29 " - without arguments: print date & time\n"
30 " - with numeric argument: set the system date & time\n"
31 " - with 'reset' argument: reset the RTC"
36 !mdr
, 3, 1, do_dump_mem
,
41 !mde
, 3, 1, do_dump_mem
,
46 !cpe
, 4, 0, do_eep_cp
,
52 mstep
, 2, 1, do_busreq_pulse
,
53 "execute one M cycle",
55 " - repeat count times"
58 echo
, CONFIG_SYS_MAXARGS
, 1, do_echo
,
59 "echo args to console",
61 " - echo args to console; \\c suppresses newline"
63 CMD_TBL_ITEM_COMPLETE(
64 run
, CONFIG_SYS_MAXARGS
, 1, do_run
,
65 "run commands in an environment variable",
67 " - run the commands in the environment variable(s) 'var'",
70 CMD_TBL_ITEM_COMPLETE(
71 printenv
, CONFIG_SYS_MAXARGS
, 1, do_env_print
,
72 "print environment variables",
74 " - print values of all environment variables\n"
76 " - print value of environment variable 'name'",
79 CMD_TBL_ITEM_COMPLETE(
80 setenv
, CONFIG_SYS_MAXARGS
, 0, do_env_set
,
81 "set environment variables",
83 " - set environment variable 'name' to 'value ...'\n"
85 " - delete environment variable 'name'",
89 saveenv
, 1, 0, do_env_save
,
90 "save environment variables to persistent storage",
94 defaultenv
, 1, 0, do_env_default
,
95 "set all environment variables to their default values",
100 loadf
, 1, 0, do_loadf
,
101 "load srec_cat prepared image from controller flash",
106 "start application at address 'addr'",
108 " - start application at address 'addr'"
110 // " passing 'arg' as arguments"
113 reset
, 1, 0, do_reset
,
114 "Keep CPU in RESET state",
118 restart
, 1, 0, do_restart
,
119 "Perform RESET of the CPU",
126 "address [# of objects]"
130 "memory modify (auto-incrementing address)",
135 "memory modify (constant address)",
140 "memory write (fill)",
141 "address value [count]"
146 "source target count"
149 cmp
, 4, 1, do_mem_cmp
,
154 base
, 2, 1, do_mem_base
,
155 "print or set address offset",
157 " - print address offset for memory commands\n"
159 " - set address offset for memory commands to 'offset'"
162 loop
, 3, 1, do_mem_loop
,
163 "infinite loop on address range",
164 "address number_of_bytes"
168 loopw
, 4, 1, do_mem_loopw
,
169 "infinite write loop on address range",
170 "address number_of_bytes data_to_write"
172 #endif /* CONFIG_LOOPW */
174 #ifdef CONFIG_CMD_MEMTEST
176 mtest
, 5, 1, do_mem_mtest
,
177 "simple RAM read/write test",
178 "[start [end [pattern [iterations]]]]"
180 #endif /* CONFIG_CMD_MEMTEST */
182 #ifdef CONFIG_MX_CYCLIC
184 mdc
, 4, 1, do_mem_mdc
,
185 "memory display cyclic",
186 "address count delay(ms)"
189 mwc
, 4, 1, do_mem_mwc
,
190 "memory write cyclic",
191 "address value delay(ms)"
193 #endif /* CONFIG_MX_CYCLIC */
197 help
, CONFIG_SYS_MAXARGS
, 1, do_help
,
198 "print command description/usage",
200 " - print brief description of all commands\n"
202 " - print detailed usage of 'command'"
205 /* This does not use the CMD_TBL_ITEM macro as ? can't be used in symbol names */
206 {FSTR("?"), CONFIG_SYS_MAXARGS
, 1, do_help
,
207 FSTR("alias for 'help'"),
208 #ifdef CONFIG_SYS_LONGHELP
210 #endif /* CONFIG_SYS_LONGHELP */
211 #ifdef CONFIG_AUTO_COMPLETE
215 /* Mark end of table */