Make sure that long reads are aborted early if the connection times out while waiting on more bytes in the AVRISP MKII clone project.

This commit is contained in:
Dean Camera 2010-04-30 08:33:21 +00:00
parent ceb16ee24f
commit 9a1560dc05
3 changed files with 8 additions and 5 deletions

View file

@ -338,6 +338,9 @@ uint8_t XPROGTarget_ReceiveByte(void)
}
}
if (TimeoutMSRemaining)
TimeoutMSRemaining = COMMAND_TIMEOUT_MS;
return UDR1;
#else
/* Wait until a byte has been received before reading */