avr.c: Fix avr_tpi_poll_nvmbsy() polling returned data instead return

code

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1155 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
hweisbach 2013-05-02 11:07:30 +00:00
parent 7e1778019a
commit 9c6c6d2f59
2 changed files with 2 additions and 1 deletions

View File

@ -2,6 +2,7 @@
* avrftdi_private.h: Add libusb-1.0 include to fix include order in windows. * avrftdi_private.h: Add libusb-1.0 include to fix include order in windows.
* NEWS: Add notice avrftdi supporting TPI * NEWS: Add notice avrftdi supporting TPI
* avr.c: Fix avr_tpi_poll_nvmbsy() - poll read data instead of return code
2013-04-30 Hannes Weisbach <hannes_weisbach@gmx.net> 2013-04-30 Hannes Weisbach <hannes_weisbach@gmx.net>

2
avr.c
View File

@ -51,7 +51,7 @@ int avr_tpi_poll_nvmbsy(PROGRAMMER *pgm)
cmd = TPI_CMD_SIN | TPI_SIO_ADDR(TPI_IOREG_NVMCSR); cmd = TPI_CMD_SIN | TPI_SIO_ADDR(TPI_IOREG_NVMCSR);
rc = pgm->cmd_tpi(pgm, &cmd, 1, &res, 1); rc = pgm->cmd_tpi(pgm, &cmd, 1, &res, 1);
return (rc & TPI_IOREG_NVMCSR_NVMBSY); return (res & TPI_IOREG_NVMCSR_NVMBSY);
} }
/* TPI: setup NVMCMD register and pointer register (PR) for read/write/erase */ /* TPI: setup NVMCMD register and pointer register (PR) for read/write/erase */