In avr_read() and avr_write(), if the paged access returns a
failure, fall back to byte access. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@692 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
parent
0e054fac95
commit
946810fb81
|
@ -1,3 +1,8 @@
|
|||
2006-11-23 Joerg Wunsch <j@uriah.heep.sax.de>
|
||||
|
||||
* avr.c (avr_read, avr_write): if the paged access returns a
|
||||
failure, fall back to byte access.
|
||||
|
||||
2006-11-21 Joerg Wunsch <j@uriah.heep.sax.de>
|
||||
|
||||
* jtagmkII.c: In jtagmkII_read_byte() and jtagmkII_write_byte(),
|
||||
|
|
16
avr.c
16
avr.c
|
@ -182,20 +182,13 @@ int avr_read(PROGRAMMER * pgm, AVRPART * p, char * memtype, int size,
|
|||
* efficiently than we can read it directly, so use its routine
|
||||
* instead
|
||||
*/
|
||||
if (mem->paged) {
|
||||
rc = pgm->paged_load(pgm, p, mem, mem->page_size, size);
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
}
|
||||
else {
|
||||
rc = pgm->paged_load(pgm, p, mem, pgm->page_size, size);
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
}
|
||||
if (rc == 0) {
|
||||
if (strcasecmp(mem->desc, "flash") == 0)
|
||||
return avr_mem_hiaddr(mem);
|
||||
else
|
||||
return rc;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -586,7 +579,8 @@ int avr_write(PROGRAMMER * pgm, AVRPART * p, char * memtype, int size,
|
|||
* efficiently than we can read it directly, so use its routine
|
||||
* instead
|
||||
*/
|
||||
return pgm->paged_write(pgm, p, m, m->page_size, size);
|
||||
if (pgm->paged_write(pgm, p, m, m->page_size, size) == 0)
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue