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@150 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Brian S. Dean 2002-11-01 14:40:23 +00:00
parent c5a313abe3
commit 7b11e0829d
1 changed files with 5 additions and 0 deletions

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) |