summaryrefslogtreecommitdiff
path: root/avr/command_tbl.c
diff options
context:
space:
mode:
authorLeo C2014-12-01 11:12:23 +0100
committerLeo C2014-12-01 11:12:23 +0100
commit4565be9a755c4de8ffdbc8b9a7b2d87c87f7a9e1 (patch)
tree65cc3402ed89d30ea058ed3244a36e7863110739 /avr/command_tbl.c
parent4f881b028b8e5f6d41efc430185db4d41cb48caa (diff)
downloadz180-stamp-4565be9a755c4de8ffdbc8b9a7b2d87c87f7a9e1.zip
merge do_fat_read() and do_fat_write() to do_fat_rw()
Diffstat (limited to 'avr/command_tbl.c')
-rw-r--r--avr/command_tbl.c31
1 files changed, 25 insertions, 6 deletions
diff --git a/avr/command_tbl.c b/avr/command_tbl.c
index 02d8ac8..e5c6567 100644
--- a/avr/command_tbl.c
+++ b/avr/command_tbl.c
@@ -24,8 +24,10 @@ extern command_ret_t do_gpio(cmd_tbl_t *, int, int, char * const []);
extern command_ret_t do_sd(cmd_tbl_t *, int, int, char * const []);
extern command_ret_t do_fat_stat(cmd_tbl_t *, int, int, char * const []);
extern command_ret_t do_fat_ls(cmd_tbl_t *, int, int, char * const []);
-extern command_ret_t do_fat_read(cmd_tbl_t *, int, int, char * const []);
-extern command_ret_t do_fat_write(cmd_tbl_t *, int, int, char * const []);
+//extern command_ret_t do_fat_read(cmd_tbl_t *, int, int, char * const []);
+//extern command_ret_t do_fat_write(cmd_tbl_t *, int, int, char * const []);
+extern command_ret_t do_fat_rw(cmd_tbl_t *, int, int, char * const []);
+extern command_ret_t do_testarg(cmd_tbl_t *, int, int, char * const []);
#ifdef CONFIG_SYS_LONGHELP
const FLASH char sd_help_text[] =
@@ -47,6 +49,22 @@ CMD_TBL_ITEM(
#ifdef DEBUG
CMD_TBL_ITEM(
+ test, CONFIG_SYS_MAXARGS, 1, do_testarg,
+ "print arguments",
+ ""
+),
+CMD_TBL_ITEM(
+ tst1, CONFIG_SYS_MAXARGS, 1, do_testarg,
+ "print arguments",
+ ""
+),
+CMD_TBL_ITEM(
+ tst2, CONFIG_SYS_MAXARGS, 1, do_testarg,
+ "print arguments",
+ ""
+),
+
+CMD_TBL_ITEM(
!mdr, 3, 1, do_dump_mem,
"RAM dump",
"address [count]"
@@ -254,7 +272,7 @@ CMD_TBL_ITEM(
"path"
),
CMD_TBL_ITEM(
- fatload, 5, 0, do_fat_read,
+ fatload, 5, 0, do_fat_rw,
"load binary file from a dos filesystem",
"<d:/path/filename> <addr> [bytes [pos]]\n"
" - Load binary file 'path/filename' on logical drive 'd'\n"
@@ -265,11 +283,12 @@ CMD_TBL_ITEM(
" the load stops on end of file."
),
CMD_TBL_ITEM(
- fatwrite, 4, 0, do_fat_write,
+ fatwrite, 4, 0, do_fat_rw,
"write file into a dos filesystem",
"<d:/path/filename> <addr> <bytes>\n"
- " - write file 'filename' from the address 'addr' in RAM\n"
- " to 'dev' on 'interface'"
+ " - Write file to 'path/filename' on logical drive 'd' from RAM\n"
+ " starting at address 'addr'. 'bytes' gives the size to load.\n"
+ " If 'bytes' is 0 or omitted, the load stops on end of file."
),
CMD_TBL_ITEM(