Fixed V2 Protocol READ_FLASH_ISP and READ_EEPROM_ISP handler code in the AVRISP project.
[pub/USBasp.git] / Projects / Incomplete / AVRISP / Lib / V2ProtocolTarget.c
index 15ac3e5..caa7010 100644 (file)
@@ -71,7 +71,7 @@ void V2Protocol_ChangeTargetResetLine(bool ResetTarget)
        }\r
        else\r
        {\r
-               RESET_LINE_PORT &= ~RESET_LINE_MASK;    \r
+               RESET_LINE_PORT &= ~RESET_LINE_MASK;\r
                RESET_LINE_DDR  &= ~RESET_LINE_MASK;\r
        }\r
 }\r
@@ -89,13 +89,13 @@ uint8_t V2Protocol_WaitWhileTargetBusy(void)
        \r
        do\r
        {\r
-               V2Protocol_DelayMS(1);\r
-       \r
                SPI_SendByte(0xF0);\r
                SPI_SendByte(0x00);\r
 \r
                SPI_SendByte(0x00);\r
                ResponseByte = SPI_ReceiveByte();\r
+\r
+               V2Protocol_DelayMS(1);\r
        }\r
        while ((ResponseByte & 0x01) && (TimeoutMS--));\r
 \r