From: Oleksij Rempel Date: Tue, 23 Apr 2013 13:52:04 +0000 (+0200) Subject: dbg: remove db_dump_memory X-Git-Tag: 1.3.2~4^2~3 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=6198fc2abd1f134c45d029c417c487d7b9833710;p=open-ath9k-htc-firmware.git dbg: remove db_dump_memory db_dump_memory is not correctly. Also functionality of this caommand overlap with db_cmd_memdump. There place only for one of this functions :) This patch fix a build warning too. Signed-off-by: Oleksij Rempel --- diff --git a/target_firmware/magpie_fw_dev/target/cmnos/dbg_api.c b/target_firmware/magpie_fw_dev/target/cmnos/dbg_api.c index 56c5fcb..65c30d3 100755 --- a/target_firmware/magpie_fw_dev/target/cmnos/dbg_api.c +++ b/target_firmware/magpie_fw_dev/target/cmnos/dbg_api.c @@ -47,7 +47,6 @@ int db_help_cmd(char *, char*, char*, char*); int db_ldr_cmd(char*, char*, char*, char*); int db_str_cmd(char*, char*, char*, char*); -int db_dump_memory(char* cmd, char* param1, char* param2, char* param3); int db_info_cmd(char*, char*, char*, char*); int db_cmd_dbg(char*, char*, char*, char*); int db_usb_cmd(char*, char*, char*, char*); @@ -98,7 +97,6 @@ const struct DB_COMMAND_STRUCT command_table[] = {"STR", " , Store word", db_str_cmd}, {"STRH", " , Store half word", db_str_cmd}, {"STRB", " , Store byte", db_str_cmd}, - {"DUMP", ", Dump memory", db_dump_memory}, {"INFO", ", Print debug information", db_info_cmd}, {"USB", ", usb releated command", db_usb_cmd}, {"INTR", ", intr releated command", db_intr_cmd}, @@ -515,76 +513,6 @@ int db_str_cmd(char* cmd, char* param1, char* param2, char* param3) } } -// macro extension the address to dump the memory -#define FOUR_BYTE_HEX_DUMP(addr) (" %02x %02x %02x %02x", \ - *(uint8_t*)((addr)+3), *(uint8_t*)((addr)+2), \ - *(uint8_t*)((addr)+1), *(uint8_t*)((addr))) - - -int db_dump_memory(char* cmd, char* param1, char* param2, char* param3) -{ - unsigned long addr; - unsigned long length; - unsigned long ptrAddr; - int i; - - if (db_ascii_to_hex(param1, &addr) != -1 && - (db_ascii_to_int(param2, &length) != -1)) - { - // if no length, default is 128 bytes to dump - if( length == 0 ) - length = 128; - addr &= 0xfffffffc; - - A_PRINTF("length: %d\n\r", length); - - A_PRINTF(" 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00\n\r"); - A_PRINTF("------------------------------------------------------------\n\r"); - for (i=0; i