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:
1 parent
ef44b8c036
commit
26017b68b0
10 files changed
+37
-35
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user