summaryrefslogtreecommitdiff
path: root/avr/command_tbl.c
diff options
context:
space:
mode:
authorLeo C2014-08-16 13:57:10 +0200
committerLeo C2014-08-16 13:57:10 +0200
commit323398b1e863d2a23251d44d3bba260675139499 (patch)
tree14a3de5768cde38acddc968dc085e542f90950c0 /avr/command_tbl.c
parent534e1dfcb2f6cdfa1cd62913045b832f2189b7aa (diff)
downloadz180-stamp-323398b1e863d2a23251d44d3bba260675139499.zip
Add command saveenv
Add debug commands for EEPROM display and copy
Diffstat (limited to 'avr/command_tbl.c')
-rw-r--r--avr/command_tbl.c26
1 files changed, 23 insertions, 3 deletions
diff --git a/avr/command_tbl.c b/avr/command_tbl.c
index 2717a37..31566b4 100644
--- a/avr/command_tbl.c
+++ b/avr/command_tbl.c
@@ -9,13 +9,28 @@ extern int do_help(cmd_tbl_t *, int, int, char * const []);
extern int do_echo(cmd_tbl_t *, int, int, char * const []);
extern int do_env_print(cmd_tbl_t *, int, int, char * const []);
extern int do_env_set(cmd_tbl_t *, int, int, char * const []);
+extern int do_env_save(cmd_tbl_t *, int, int, char * const []);
extern int do_loadf(cmd_tbl_t *, int, int, char * const []);
extern int do_go(cmd_tbl_t *, int, int, char * const []);
extern int do_restart(cmd_tbl_t *, int, int, char * const []);
+extern int do_dump_eep(cmd_tbl_t *, int, int, char * const []);
+extern int do_eep_cp(cmd_tbl_t *, int, int, char * const []);
cmd_tbl_t cmd_tbl[] = {
+#ifdef DEBUG
+CMD_TBL_ITEM(
+ !emd, 3, 0, do_dump_eep,
+ "EEPROM dump",
+ "address [count]"
+),
+CMD_TBL_ITEM(
+ !ecp, 4, 1, do_eep_cp,
+ "EEPROM copy",
+ "source target count"
+),
+#endif
CMD_TBL_ITEM(
echo, CONFIG_SYS_MAXARGS, 1, do_echo,
"echo args to console",
@@ -47,14 +62,19 @@ CMD_TBL_ITEM_COMPLETE(
" - delete environment variable 'name'",
var_complete
),
+CMD_TBL_ITEM(
+ saveenv, 1, 0, do_env_save,
+ "save environment variables to persistent storage",
+ ""
+),
CMD_TBL_ITEM(
- loadf, 1, 0, do_loadf,
+ loadf, 1, 0, do_loadf,
"load srec_cat prepared image from controller flash",
""
),
CMD_TBL_ITEM(
- go, 2, 0, do_go,
+ go, 2, 0, do_go,
"start application at address 'addr'",
"addr\n"
" - start application at address 'addr'"
@@ -62,7 +82,7 @@ CMD_TBL_ITEM(
// " passing 'arg' as arguments"
),
CMD_TBL_ITEM(
- reset, 1, 0, do_reset,
+ reset, 1, 0, do_reset,
"Keep CPU in RESET state",
""
),