Added new \ref SPI_GetCurrentMode() function to the SPI peripheral driver.
[pub/USBasp.git] / Projects / AVRISP-MKII / Lib / XPROG / XPROGTarget.c
index 7cf62ff..af0cc01 100644 (file)
@@ -140,7 +140,7 @@ void XPROGTarget_SendByte(const uint8_t Byte)
        UDR1    = Byte;
 }
 
        UDR1    = Byte;
 }
 
-/** Receives a byte via the software USART, blocking until data is received.
+/** Receives a byte via the hardware USART, blocking until data is received or timeout expired.
  *
  *  \return Received byte from the USART
  */
  *
  *  \return Received byte from the USART
  */
@@ -151,7 +151,7 @@ uint8_t XPROGTarget_ReceiveByte(void)
          XPROGTarget_SetRxMode();
 
        /* Wait until a byte has been received before reading */
          XPROGTarget_SetRxMode();
 
        /* Wait until a byte has been received before reading */
-       while (!(UCSR1A & (1 << RXC1)) && TimeoutTicksRemaining);
+       while (!(UCSR1A & (1 << RXC1)) && !(TimeoutExpired));
 
        return UDR1;
 }
 
        return UDR1;
 }