From ae639b82d163b19ee2bf51cce9e140f971702d2d Mon Sep 17 00:00:00 2001 From: Christian Starkjohann Date: Sat, 3 May 2008 19:11:23 +0000 Subject: - we must initialize usbTxLen[13] to USBPID_NAK, otherwise the host is confused about the long initial packet and disqualifies the device --- usbdrv/usbdrv.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'usbdrv') diff --git a/usbdrv/usbdrv.c b/usbdrv/usbdrv.c index ffa0bec..c4141a1 100644 --- a/usbdrv/usbdrv.c +++ b/usbdrv/usbdrv.c @@ -617,10 +617,12 @@ USB_PUBLIC void usbInit(void) #endif USB_INTR_ENABLE |= (1 << USB_INTR_ENABLE_BIT); usbResetDataToggling(); -/* We don't reset usbTxLen1 and usbTxLen3 to USBPID_NAK because this is done - * in RESET condition anyway (usbResetStall()). If an IN token is received - * BEFORE USB Reset, we send out 256 bytes of nonsense. - */ +#if USB_CFG_HAVE_INTRIN_ENDPOINT + usbTxLen1 = USBPID_NAK; +#if USB_CFG_HAVE_INTRIN_ENDPOINT3 + usbTxLen3 = USBPID_NAK; +#endif +#endif } /* ------------------------------------------------------------------------- */ -- cgit v1.2.3