Remove the erase cycle counter (options -y / -Y).

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1203 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Joerg Wunsch
2013-09-03 20:13:37 +00:00
parent 770d26689b
commit 8ed6920948
7 changed files with 15 additions and 127 deletions

21
avr.c
View File

@@ -1172,31 +1172,10 @@ int avr_put_cycle_count(PROGRAMMER * pgm, AVRPART * p, int cycles)
int avr_chip_erase(PROGRAMMER * pgm, AVRPART * p)
{
int cycles;
int rc;
if (do_cycles) {
rc = avr_get_cycle_count(pgm, p, &cycles);
/*
* Don't update the cycle counter, if read failed
*/
if(rc != 0) {
do_cycles = 0;
}
}
rc = pgm->chip_erase(pgm, p);
/*
* Don't update the cycle counter, if erase failed
*/
if (do_cycles && (rc == 0)) {
cycles++;
fprintf(stderr, "%s: erase-rewrite cycle count is now %d\n",
progname, cycles);
avr_put_cycle_count(pgm, p, cycles);
}
return rc;
}