summaryrefslogtreecommitdiff
path: root/avr/debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'avr/debug.c')
-rw-r--r--avr/debug.c16
1 files changed, 8 insertions, 8 deletions
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 */