mirror of
https://github.com/avrdudes/avrdude.git
synced 2026-09-29 04:18:54 +03:00
Initialize progress reporting in avr_{read,write}_mem
Progress reporting needs to be initialized by passing it a "header"
string, in order to re-adjust internal static variables.
avr_{read,write}_mem did not do this, so they only reported progress
upon the very first invocation.
This commit is contained in:
@@ -367,6 +367,7 @@ int avr_read_mem(const PROGRAMMER *pgm, const AVRPART *p, const AVRMEM *mem, con
|
||||
* start with all 0xff
|
||||
*/
|
||||
memset(mem->buf, 0xff, mem->size);
|
||||
report_progress(0, 1, "Reading");
|
||||
|
||||
/* supports "paged load" thru post-increment */
|
||||
if ((p->prog_modes & PM_TPI) && mem->page_size > 1 &&
|
||||
@@ -968,6 +969,7 @@ int avr_write_mem(const PROGRAMMER *pgm, const AVRPART *p, const AVRMEM *m, int
|
||||
return wsize;
|
||||
}
|
||||
|
||||
report_progress(0, 1, "Writing");
|
||||
if ((p->prog_modes & PM_TPI) && m->page_size > 1 && pgm->cmd_tpi) {
|
||||
unsigned int chunk; /* number of words for each write command */
|
||||
unsigned int j, writeable_chunk;
|
||||
|
||||
Reference in New Issue
Block a user