Make sure that USB_STREAM_TIMEOUT_MS is set in the MassStorageHost ClassDriver demo, so that slow devices don't time out the data pipe. Increase pipe timeout in both MassStorageHost demos to 5 seconds to account for the really slow devices.

Fix TeensyHID bootloader not properly shutting down the USB interface to trigger a disconnection on the host before resetting the AVR.
This commit is contained in:
Dean Camera 2009-12-08 07:43:33 +00:00
parent 3757b1760f
commit 2281750b5f
5 changed files with 11 additions and 6 deletions

View file

@ -109,7 +109,10 @@ static void PDIProtocol_EnterXPROGMode(void)
/* Must hold DATA line high for at least 90nS to enable PDI interface */
PDIDATA_LINE_PORT |= PDIDATA_LINE_MASK;
_delay_us(1);
asm volatile ("NOP"::);
#if (F_CPU > 8000000)
asm volatile ("NOP"::);
#endif
/* Toggle CLOCK line 16 times within 100uS of the original 90nS timeout to keep PDI interface enabled */
for (uint8_t i = 0; i < 16; i++)