Be backward compatible with the 2-byte rewrite cycle counter which

appeared in version 2.1.0, but was changed to a 4 byte counter in
version 2.1.1.  Reminded by Joerg Wunsch.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@150 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Brian S. Dean 2002-11-01 14:40:23 +00:00
parent b278d02a94
commit 12641b2f6c
1 changed files with 5 additions and 0 deletions

5
avr.c
View File

@ -1082,6 +1082,11 @@ int avr_get_cycle_count(int fd, AVRPART * p)
return -1;
}
if ((v1 == 0xff) && (v2 == 0xff) && (v3 != 0xff) && (v4 != 0xff)) {
v1 = 0;
v2 = 0;
}
cycle_count = (((unsigned int)v1) << 24) |
(((unsigned int)v2) << 16) |
(((unsigned int)v3) << 8) |