From d0581f881c4072ef0ac453167a98dc3bc0d87d86 Mon Sep 17 00:00:00 2001 From: Leo C Date: Wed, 20 Aug 2014 14:01:11 +0200 Subject: enum command_ret_t --> typedef --- avr/debug.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'avr/debug.c') diff --git a/avr/debug.c b/avr/debug.c index e62869b..4591397 100644 --- a/avr/debug.c +++ b/avr/debug.c @@ -140,7 +140,7 @@ void dump_eep(const uint8_t *addr, unsigned int len, * EEPROM Display * md addr {len} */ -int do_dump_mem(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +command_ret_t do_dump_mem(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { // static const uint8_t *addr; // static uint16_t length = 128; @@ -171,10 +171,10 @@ int do_dump_mem(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) /* Print the lines. */ dump_mem(addr, length, readhow, NULL); - return 0; + return CMD_RET_SUCCESS; } -int do_eep_cp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +command_ret_t do_eep_cp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { uint16_t src, dest, count; int_fast8_t step; @@ -191,19 +191,19 @@ int do_eep_cp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) if (src > E2END) { debug("src > EEPROM size: 0x%04x\n", src); - return 1; + return CMD_RET_FAILURE; } if (dest > E2END) { debug("dest > EEPROM size: 0x%04x\n", dest); - return 1; + return CMD_RET_FAILURE; } if (count > E2END+1) { debug("count > EEPROM size: 0x%04x\n", count); - return 1; + return CMD_RET_FAILURE; } if (count == 0) { debug("Zero length ???\n"); - return 1; + return CMD_RET_FAILURE; } if (dest > src) { @@ -221,7 +221,7 @@ int do_eep_cp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) dest += step; } - return 0; + return CMD_RET_SUCCESS; } #endif /* DEBUG */ -- cgit v1.2.3