* stk500.c: Don't print out read/write byte progress unless the verbose

option is given.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@306 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Theodore A. Roth 2003-04-07 17:18:51 +00:00
parent d2317147db
commit 6c3cb9fbb2
2 changed files with 20 additions and 6 deletions

View File

@ -1,3 +1,8 @@
2003-04-07 Theodore A. Roth <troth@openavr.org>
* stk500.c: Don't print out read/write byte progress unless the verbose
option is given.
2003-04-05 Theodore A. Roth <troth@openavr.org> 2003-04-05 Theodore A. Roth <troth@openavr.org>
* avr910.c: Re-add the avr910 byte read/write methods which were * avr910.c: Re-add the avr910 byte read/write methods which were

View File

@ -41,6 +41,7 @@
#include "serial.h" #include "serial.h"
extern int verbose;
extern char * progname; extern char * progname;
extern int do_cycles; extern int do_cycles;
@ -727,7 +728,9 @@ static int stk500_paged_write(PROGRAMMER * pgm, AVRPART * p, AVRMEM * m,
#endif #endif
for (addr = 0; addr < n; addr += page_size) { for (addr = 0; addr < n; addr += page_size) {
fprintf(stderr, "\r \r%6u", addr); if (verbose) {
fprintf(stderr, "\r \r%6u", addr);
}
tries = 0; tries = 0;
retry: retry:
tries++; tries++;
@ -771,8 +774,10 @@ static int stk500_paged_write(PROGRAMMER * pgm, AVRPART * p, AVRMEM * m,
return -5; return -5;
} }
} }
fprintf(stderr, "\r \r%6u", addr-1); if (verbose) {
fprintf(stderr, "\n"); fprintf(stderr, "\r \r%6u", addr-1);
fprintf(stderr, "\n");
}
return n; return n;
} }
@ -817,7 +822,9 @@ static int stk500_paged_load(PROGRAMMER * pgm, AVRPART * p, AVRMEM * m,
} }
for (addr = 0; addr < n; addr += page_size) { for (addr = 0; addr < n; addr += page_size) {
fprintf(stderr, "\r \r%6u", addr); if (verbose) {
fprintf(stderr, "\r \r%6u", addr);
}
tries = 0; tries = 0;
retry: retry:
tries++; tries++;
@ -858,8 +865,10 @@ static int stk500_paged_load(PROGRAMMER * pgm, AVRPART * p, AVRMEM * m,
return -5; return -5;
} }
} }
fprintf(stderr, "\r \r%6u", addr-1); if (verbose) {
fprintf(stderr, "\n"); fprintf(stderr, "\r \r%6u", addr-1);
fprintf(stderr, "\n");
}
return n; return n;
} }