From: Leo C Date: Tue, 28 Apr 2015 17:14:23 +0000 (+0200) Subject: intel hex: flush input buffer after loading X-Git-Tag: hexrel-6~22 X-Git-Url: http://cloudbase.mooo.com/gitweb/z180-stamp.git/commitdiff_plain/4cbc8d3ed4e0d5624872ead9f8519b1cea8cf5ac?ds=inline intel hex: flush input buffer after loading --- diff --git a/avr/cmd_loadihex.c b/avr/cmd_loadihex.c index debccd7..aaee064 100644 --- a/avr/cmd_loadihex.c +++ b/avr/cmd_loadihex.c @@ -224,6 +224,10 @@ command_ret_t do_loadihex(cmd_tbl_t *cmdtp, int flag, int argc, char * const arg break; } + /* flush input buffer */ + while (my_getchar(0) > 0) + ; + printf_P(PSTR("Data loaded: ")); if (address_low >= MIN(address_high, address_max)) printf_P(PSTR("None.\n"));