bug #60753: Patch #1436 breaks multiple programmer/device combinations on MacOS BigSur

* avr.c: compare page_size > 1 instead of != 0
* stk500v2.c: (Ditto.)




git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1452 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Joerg Wunsch
2021-06-27 20:26:05 +00:00
parent 69a771317f
commit 38e5aa33ea
4 changed files with 17 additions and 11 deletions

8
avr.c
View File

@@ -330,7 +330,7 @@ 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 ((p->flags & AVRPART_HAS_TPI) && mem->page_size > 1 &&
pgm->cmd_tpi != NULL) {
while (avr_tpi_poll_nvmbsy(pgm));
@@ -361,7 +361,7 @@ int avr_read(PROGRAMMER * pgm, AVRPART * p, char * memtype,
return avr_mem_hiaddr(mem);
}
if (pgm->paged_load != NULL && mem->page_size != 0) {
if (pgm->paged_load != NULL && mem->page_size > 1) {
/*
* the programmer supports a paged mode read
*/
@@ -863,7 +863,7 @@ int avr_write(PROGRAMMER * pgm, AVRPART * p, char * memtype, int size,
}
if ((p->flags & AVRPART_HAS_TPI) && m->page_size != 0 &&
if ((p->flags & AVRPART_HAS_TPI) && m->page_size > 1 &&
pgm->cmd_tpi != NULL) {
while (avr_tpi_poll_nvmbsy(pgm));
@@ -903,7 +903,7 @@ int avr_write(PROGRAMMER * pgm, AVRPART * p, char * memtype, int size,
return i;
}
if (pgm->paged_write != NULL && m->page_size != 0) {
if (pgm->paged_write != NULL && m->page_size > 1) {
/*
* the programmer supports a paged mode write
*/