summaryrefslogtreecommitdiff
path: root/avr/debug.c
diff options
context:
space:
mode:
authorLeo C2014-08-20 14:01:11 +0200
committerLeo C2014-08-20 14:01:11 +0200
commitd0581f881c4072ef0ac453167a98dc3bc0d87d86 (patch)
tree0aa6c87d8e0184e7a884171cb5b30275283156ad /avr/debug.c
parent4bc81323e51ac138e733c14eeb6f283ae706e904 (diff)
downloadz180-stamp-d0581f881c4072ef0ac453167a98dc3bc0d87d86.zip
enum command_ret_t --> typedef
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 */