Changed AVRISP-MKII project to use the Watchdog interrupt for command timeouts, to reduce CPU usage and free timer 0 for other uses in the future.
This commit is contained in:
parent
ef44b8c036
commit
26017b68b0
10 changed files with 37 additions and 35 deletions
|
@ -151,7 +151,7 @@ uint8_t XPROGTarget_ReceiveByte(void)
|
|||
XPROGTarget_SetRxMode();
|
||||
|
||||
/* Wait until a byte has been received before reading */
|
||||
while (!(UCSR1A & (1 << RXC1)) && TimeoutTicksRemaining);
|
||||
while (!(UCSR1A & (1 << RXC1)) && !(TimeoutExpired));
|
||||
|
||||
return UDR1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue