From c748023ede9e7d8bdbf81ce8c8be2a437607a9e4 Mon Sep 17 00:00:00 2001 From: Leo C Date: Wed, 21 Jan 2015 04:07:19 +0100 Subject: Support for Peter Danneggers fboot. --- avr/debug.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'avr/debug.c') diff --git a/avr/debug.c b/avr/debug.c index 251ef26..d4ae1f4 100644 --- a/avr/debug.c +++ b/avr/debug.c @@ -49,12 +49,19 @@ command_ret_t do_dump_mem(cmd_tbl_t *cmdtp, int flag, int argc, char * const arg uint32_t addr; uint32_t length = 128; - if (strchr(argv[0],'r') != NULL) + switch (argv[0][3]) { + case 'r': readhow = ram_read_buf; - else if (strchr(argv[0],'e') != NULL) + break; + case 'e': readhow = eeprom_read_buf; - else + break; + case 'f': + readhow = flash_read_buf; + break; + default: return CMD_RET_USAGE; + } /* Address is specified since argc > 1 */ addr = strtoul(argv[1], NULL, 16); -- cgit v1.2.3