summaryrefslogtreecommitdiff
path: root/avr
diff options
context:
space:
mode:
authorLeo C2015-04-28 19:14:23 +0200
committerLeo C2015-04-28 19:14:23 +0200
commit4cbc8d3ed4e0d5624872ead9f8519b1cea8cf5ac (patch)
treefd5f247f0d78b11e7861421a64b4a322fc58c413 /avr
parentd264541a3e7fe756695f811136d7a89e8e7ec478 (diff)
downloadz180-stamp-4cbc8d3ed4e0d5624872ead9f8519b1cea8cf5ac.zip
intel hex: flush input buffer after loading
Diffstat (limited to 'avr')
-rw-r--r--avr/cmd_loadihex.c4
1 files changed, 4 insertions, 0 deletions
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"));