/*
* (C) Copyright 2014 Leo C. <erbl259-lmu@yahoo.de>
*
- * SPDX-License-Identifier: GPL-2.0+
+ * SPDX-License-Identifier: GPL-2.0
*/
+#include "debug.h"
#include "common.h"
#include <stdlib.h>
#include <string.h>
#include "command.h"
#include "cli_readline.h"
#include "print-utils.h"
-#include "debug.h"
/*
* Debugging
*/
command_ret_t do_dump_mem(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
- void (*readwhat)(uint8_t *buf, uint32_t addr, uint8_t count);
+ int (*readwhat)(uint8_t *buf, uint32_t addr, uint8_t count);
(void) cmdtp; (void) flag;
data = *addr;
printf_P(PSTR("%04x: %02x"), addr, data);
- nbytes = cli_readline(PSTR(" ? "));
+ nbytes = cli_readline(PSTR(" ? "), 0);
if (nbytes == 0 || (nbytes == 1 && console_buffer[0] == '-')) {
/* <CR> pressed as only input, don't modify current
* location and move to next. "-" pressed will go back.