X-Git-Url: http://cloudbase.mooo.com/gitweb/z180-stamp.git/blobdiff_plain/8a7deceacd30529e5c32082b2c719eb055841d0d..refs/tags/hexrel-6:/avr/cmd_boot.c diff --git a/avr/cmd_boot.c b/avr/cmd_boot.c index 2c3a533..f9f8f90 100644 --- a/avr/cmd_boot.c +++ b/avr/cmd_boot.c @@ -1,3 +1,11 @@ +/* + * (C) Copyright 2014 Leo C. + * + * (C) Copyright 2000-2003 + * Wolfgang Denk, DENX Software Engineering, wd@denx.de. + * + * SPDX-License-Identifier: GPL-2.0+ + */ /* * Misc boot support @@ -34,7 +42,7 @@ static void z80_load_mem(void) hdrom_length_of_sections[sec]); z80_bus_cmd(Request); - z80_write_block((const FLASH unsigned char *) &hdrom[sec_base], /* src */ + z80_write_block_P((const FLASH unsigned char *) &hdrom[sec_base], /* src */ hdrom_address[sec], /* dest */ hdrom_length_of_sections[sec]); /* len */ z80_bus_cmd(Release); @@ -176,7 +184,7 @@ command_ret_t do_console(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv // uint8_t help_prompt = 0; uint8_t code = 0; uint8_t state = 0; - + (void) cmdtp; (void) flag; (void) argc; (void) argv; @@ -186,9 +194,11 @@ command_ret_t do_console(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv pending = (Stat & S_CON_PENDING) != 0; Stat &= ~S_CON_PENDING; } - if (pending) - while ((ch = z80_memfifo_getc(fifo_conout)) >= 0) + if (pending) { + uint8_t count = 100; + while ((ch = z80_memfifo_getc(fifo_conout)) >= 0 && --count) putchar(ch); + } if ((ch = my_getchar(0)) >= 0) { switch (state) { @@ -198,7 +208,7 @@ command_ret_t do_console(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv /* TODO: Timer starten */ } else { z80_memfifo_putc(fifo_conin, ch); - } + } break; case 2: printf_P(PSTR("\n" @@ -272,4 +282,3 @@ command_ret_t do_console(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv quit: return CMD_RET_SUCCESS; } -