Make sure that USB_STREAM_TIMEOUT_MS is set in the MassStorageHost ClassDriver demo...
[pub/USBasp.git] / Projects / AVRISP / Lib / PDIProtocol.c
index 93634a0..d98c51c 100644 (file)
@@ -109,7 +109,10 @@ static void PDIProtocol_EnterXPROGMode(void)
        \r
        /* Must hold DATA line high for at least 90nS to enable PDI interface */\r
        PDIDATA_LINE_PORT |= PDIDATA_LINE_MASK;\r
-       _delay_us(1);\r
+       asm volatile ("NOP"::);\r
+       #if (F_CPU > 8000000)\r
+       asm volatile ("NOP"::);\r
+       #endif\r
        \r
        /* Toggle CLOCK line 16 times within 100uS of the original 90nS timeout to keep PDI interface enabled */\r
        for (uint8_t i = 0; i < 16; i++)\r