mirror of
https://github.com/mariusgreuel/avrdude.git
synced 2025-09-27 14:35:27 +00:00
* avr.c (avr_read, avr_write): Don't bail out on TPI parts if
their programmer doesn't provide a (low-level) cmd_tpi method; instead, fall back to the normal programmer methods which are supposed to handle the situation. This fixes a regression where the recent bitbang-TPI implementation broke TPI handling of STK600/AVRISPmkII. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1008 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
17
avr.c
17
avr.c
@@ -235,12 +235,8 @@ int avr_read(PROGRAMMER * pgm, AVRPART * p, char * memtype,
|
||||
memset(mem->buf, 0xff, mem->size);
|
||||
|
||||
/* supports "paged load" thru post-increment */
|
||||
if ((p->flags & AVRPART_HAS_TPI) && mem->page_size != 0) {
|
||||
if (pgm->cmd_tpi == NULL) {
|
||||
fprintf(stderr, "%s: Error: %s programmer does not support TPI\n",
|
||||
progname, pgm->type);
|
||||
return -1;
|
||||
}
|
||||
if ((p->flags & AVRPART_HAS_TPI) && mem->page_size != 0 &&
|
||||
pgm->cmd_tpi != NULL) {
|
||||
|
||||
while (avr_tpi_poll_nvmbsy(pgm));
|
||||
|
||||
@@ -752,13 +748,8 @@ int avr_write(PROGRAMMER * pgm, AVRPART * p, char * memtype, int size,
|
||||
}
|
||||
|
||||
|
||||
if ((p->flags & AVRPART_HAS_TPI) && m->page_size != 0) {
|
||||
if (pgm->cmd_tpi == NULL) {
|
||||
fprintf(stderr,
|
||||
"%s: Error: %s programmer does not support TPI\n",
|
||||
progname, pgm->type);
|
||||
return -1;
|
||||
}
|
||||
if ((p->flags & AVRPART_HAS_TPI) && m->page_size != 0 &&
|
||||
pgm->cmd_tpi != NULL) {
|
||||
|
||||
while (avr_tpi_poll_nvmbsy(pgm));
|
||||
|
||||
|
Reference in New Issue
Block a user