X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/899df7d3318e478859d940ec8debe679888476a5..77a9df36a77d2523dd2bc24fa17f9f04c6c175c5:/Projects/AVRISP-MKII/Lib/ISP/ISPProtocol.c diff --git a/Projects/AVRISP-MKII/Lib/ISP/ISPProtocol.c b/Projects/AVRISP-MKII/Lib/ISP/ISPProtocol.c index 421046b5a..e9e92f99a 100644 --- a/Projects/AVRISP-MKII/Lib/ISP/ISPProtocol.c +++ b/Projects/AVRISP-MKII/Lib/ISP/ISPProtocol.c @@ -230,18 +230,18 @@ void ISPProtocol_ProgramMemory(uint8_t V2Command) if (ProgrammingStatus != STATUS_CMD_OK) break; - /* Must reset the polling address afterwards, so it is not erronously used for the next byte */ + /* Must reset the polling address afterwards, so it is not erroneously used for the next byte */ PollAddress = 0; } /* EEPROM just increments the address each byte, flash needs to increment on each word and * also check to ensure that a LOAD EXTENDED ADDRESS command is issued each time the extended - * address boundary has been crossed */ + * address boundary has been crossed during FLASH memory programming */ if ((CurrentByte & 0x01) || (V2Command == CMD_PROGRAM_EEPROM_ISP)) { CurrentAddress++; - if ((V2Command != CMD_PROGRAM_EEPROM_ISP) && !(CurrentAddress & 0xFFFF)) + if ((V2Command == CMD_PROGRAM_FLASH_ISP) && !(CurrentAddress & 0xFFFF)) MustLoadExtendedAddress = true; } } @@ -519,7 +519,7 @@ void ISPProtocol_SPIMulti(void) void ISPProtocol_DelayMS(uint8_t DelayMS) { while (DelayMS-- && !(TimeoutExpired)) - _delay_ms(1); + Delay_MS(1); } #endif