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:
parent
ceb16ee24f
commit
9a1560dc05
3 changed files with 8 additions and 5 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue