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:
Hannes Weisbach
2013-05-02 11:07:30 +00:00
parent aca6384fe7
commit bf49c4ee1f
2 changed files with 2 additions and 1 deletions

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);
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 */