forked from mirror/qmk_firmware
Fixed AVRISP-MKII Clone timing out on long programming commands such as programming the EEPROM on an ATMEGA8 (thanks to Martin Kelling).
This commit is contained in:
@@ -357,6 +357,9 @@ uint8_t ISPTarget_WaitForProgComplete(const uint8_t ProgrammingMode,
|
||||
break;
|
||||
}
|
||||
|
||||
/* Program complete - reset timeout */
|
||||
wdt_reset();
|
||||
|
||||
return ProgrammingStatus;
|
||||
}
|
||||
|
||||
|
||||
@@ -155,6 +155,9 @@ uint8_t XPROGTarget_ReceiveByte(void)
|
||||
/* Wait until a byte has been received before reading */
|
||||
while (!(UCSR1A & (1 << RXC1)) && !(TimeoutExpired));
|
||||
|
||||
/* Byte of data received - reset the timeout */
|
||||
wdt_reset();
|
||||
|
||||
return UDR1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user