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:
parent
4a3a651831
commit
4aa81bac9b
5
avr.c
5
avr.c
|
@ -1082,6 +1082,11 @@ int avr_get_cycle_count(int fd, AVRPART * p)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((v1 == 0xff) && (v2 == 0xff) && (v3 != 0xff) && (v4 != 0xff)) {
|
||||||
|
v1 = 0;
|
||||||
|
v2 = 0;
|
||||||
|
}
|
||||||
|
|
||||||
cycle_count = (((unsigned int)v1) << 24) |
|
cycle_count = (((unsigned int)v1) << 24) |
|
||||||
(((unsigned int)v2) << 16) |
|
(((unsigned int)v2) << 16) |
|
||||||
(((unsigned int)v3) << 8) |
|
(((unsigned int)v3) << 8) |
|
||||||
|
|
Loading…
Reference in New Issue