aboutsummaryrefslogtreecommitdiffstats
path: root/usbdrv
diff options
context:
space:
mode:
authorChristian Starkjohann <cs+github@obdev.at>2008-05-03 19:11:23 +0000
committerChristian Starkjohann <cs+github@obdev.at>2008-05-03 19:11:23 +0000
commitae639b82d163b19ee2bf51cce9e140f971702d2d (patch)
tree5f5b8f41e9a0e909e3c2e8253aadc7ccdc97ef27 /usbdrv
parentb39c5ec739a2e02ba34739190aa7ab07bfa624bb (diff)
downloadv-usb-ae639b82d163b19ee2bf51cce9e140f971702d2d.tar.gz
v-usb-ae639b82d163b19ee2bf51cce9e140f971702d2d.tar.bz2
v-usb-ae639b82d163b19ee2bf51cce9e140f971702d2d.zip
- we must initialize usbTxLen[13] to USBPID_NAK, otherwise the host is
confused about the long initial packet and disqualifies the device
Diffstat (limited to 'usbdrv')
-rw-r--r--usbdrv/usbdrv.c10
1 files changed, 6 insertions, 4 deletions
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
}
/* ------------------------------------------------------------------------- */