Make sure CRC value is pre-zeroed before reading from the XMEGA target device, to...
[pub/USBasp.git] / Projects / AVRISP-MKII / Lib / XPROG / XPROGTarget.c
index c4f6317..b2f5552 100644 (file)
@@ -1,13 +1,13 @@
 /*
              LUFA Library
-     Copyright (C) Dean Camera, 2011.
+     Copyright (C) Dean Camera, 2012.
 
   dean [at] fourwalledcubicle [dot] com
            www.lufa-lib.org
 */
 
 /*
-  Copyright 2011  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)
 
   Permission to use, copy, modify, distribute, and sell this
   software and its documentation for any purpose is hereby granted
@@ -153,10 +153,7 @@ uint8_t XPROGTarget_ReceiveByte(void)
          XPROGTarget_SetRxMode();
 
        /* Wait until a byte has been received before reading */
-       while (!(UCSR1A & (1 << RXC1)) && !(TimeoutExpired));
-
-       /* Byte of data received - reset the timeout */
-       wdt_reset();
+       while (!(UCSR1A & (1 << RXC1)) && TimeoutTicksRemaining);
 
        return UDR1;
 }