X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/03130342451003093e654edc5b031718d544e9ba..666c0fa4c31b2c9f7f02f6d0e09551e24dc4680c:/Projects/AVRISP-MKII/Lib/ISP/ISPProtocol.c diff --git a/Projects/AVRISP-MKII/Lib/ISP/ISPProtocol.c b/Projects/AVRISP-MKII/Lib/ISP/ISPProtocol.c index 2ce11a8ee..d6e02fa2b 100644 --- a/Projects/AVRISP-MKII/Lib/ISP/ISPProtocol.c +++ b/Projects/AVRISP-MKII/Lib/ISP/ISPProtocol.c @@ -76,7 +76,7 @@ void ISPProtocol_EnterISPMode(void) /* Continuously attempt to synchronize with the target until either the number of attempts specified * by the host has exceeded, or the the device sends back the expected response values */ - while (Enter_ISP_Params.SynchLoops-- && (ResponseStatus == STATUS_CMD_FAILED) && TimeoutMSRemaining) + while (Enter_ISP_Params.SynchLoops-- && (ResponseStatus == STATUS_CMD_FAILED) && TimeoutTicksRemaining) { uint8_t ResponseBytes[4]; @@ -552,13 +552,8 @@ void ISPProtocol_SPIMulti(void) */ void ISPProtocol_DelayMS(uint8_t DelayMS) { - while (DelayMS-- && TimeoutMSRemaining) - { - if (TimeoutMSRemaining) - TimeoutMSRemaining--; - - _delay_ms(1); - } + while (DelayMS-- && TimeoutTicksRemaining) + _delay_ms(1); } #endif \ No newline at end of file